Cryptographically random numbers

Gervasio Bernal gervasiobernal at speedy.com.ar
Tue Mar 7 07:14:43 EST 2006


Bryan Olson wrote:
> Tuvas wrote:
> 
>>Ahh, you are correct, that is a large bug... How about this one?
> 
> 
> Much better. Do note the comments from Emile van Sebille and Paul
> Rubin. There are some minor style and efficiency points, but it
> looks reasonable.
> 
> Incidentally, as of Python 2.4, the standard library offers
> random.SystemRandom, which will generate integers in any desired
> range using os.urandom as the entropy source.
> 
> 

How can I generate a random string containing digits, symbols and
letters? I will use this random string for the key of a cryptographic
algorithm.
Thanks




More information about the Python-list mailing list