Diez B. Roggisch
deets at nospam.web.de
Mon Jan 28 16:27:31 CET 2008
rogerrath2 at gmail.com wrote:
> Hello -
> I'm still using Python 2.4. In my code, I want to encrypt a password
> and at another point decrypt it. What is the standard way of doing
> encryption in python? Is it the Pycrypto module?
Usually, one doesn't store clear-text passwords. Instead, use a
hash-algorithm like md5 or crypt (the former is in the standard lib, don't
know of the other out of my head) and hash the password, and store that
If a user enters the password, use the same algorithm, and compare the
resulting hashes with the stored one.
More information about the Python-list