Random passwords generation (Python vs Perl) =)

Paul Rubin http
Mon Jan 29 09:06:21 EST 2007


"Paul McGuire" <ptmcg at austin.rr.com> writes:
> from random import choice

Security note: if you're trying to generate real passwords this way,
you're better off using os.urandom instead of the random module to
generate the random numbers.  The random module's results are supposed
to be statistically uncorrelated (good for stuff like games and
simulations) but they don't try to resist guessing by malicious
attackers.  os.urandom results are supposed to be unguessable.



More information about the Python-list mailing list