Re: string encoding binary values using specific charsets
From: John A Grandy (johnagrandy-at-yahoo-dot-com)
Date: Tue, 11 Oct 2005 15:15:17 -0700
I'm getting very frustrated on this one. Certainly .NET is not supplying
libs that easily support this type of conversion.
Does anyone know of websites where random number generation techniques are
"Joe Kaplan (MVP - ADSI)" <firstname.lastname@example.org> wrote
in message news:e7UeZCrzFHA.1256@TK2MSFTNGP09.phx.gbl...
> Sorry, I misunderstood what you were trying to do. :)
> However, I've never even thought about what you are trying to do, so I'm
> not sure I have much additional advice for you.
> Joe K.
> "John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
>> Hi Joe, and thanks for the response.
>> I'm aware of everything you mention. What I'm dealing with is a slightly
>> different problem.
>> Namely, that I need to convert a random number to a specific number of
>> chars of custom character set.
>> For example, 40 chars built on the charset A-Z a-z 0-9
>> That's 62 possible chars. So a range of 0-61 is needed. 6 bits provides
>> a range of value 0-63 - so that covers the range 0-61.
>> However the cases where 62, 63 are randomly generated are problematic:
>> If you ignore them, then the amount of time needed to generate your
>> string is non-deterministic.
>> If you translate them to values within the 0-61 range , then you have
>> altered the level of quality of randomness. (2 values within the range
>> now have twice the probability of the others.)