How to obscure a password

John Burton john.burton at jbmail.com
Thu Feb 26 19:05:22 CET 2004


Batista, Facundo wrote:
> I'm doing a small program, in which the user will have the option to enter
> his/her password everytime, or just save it (to a file).
> 
> So, is there a module to obscure the password text in a secure way?
> 
> I can't hash it (with md5 or something), because I not need to compare the
> password the user enters with a previous one.
> 
> I need to restore the password later and use it as if the user just entered
> it.
> 
> Thank you all!

Probably your best method is to install something like this -
http://www.amk.ca/python/code/crypto.html

and use AES or DES3 or similar to encrypt the passwords.
Of course you then have to keep the encryption keyt secure but that may 
or may not be a problem for you.



More information about the Python-list mailing list