MD5 Passwords and the Python MD5 module

Lorenzo M. Catucci lorenzo at
Fri Mar 31 10:36:09 CEST 2000

In article <8c0mmm$4u$1 at>, cephas_tpg at wrote:
>Thanks for the replys,
>however the crypt module, both in python and in c only produces a DES
>hash of the the password, not the md5 hash.
>Is there a python interface to PAM?
Now, You should look better, and you'll see crypt does what you expect,
iff you give the right salt:

>>> import crypt
>>> crypt.crypt('Peter','$1$sale')

As you can see, this is the shadow form of the md5 hashed and salted
password (sale is italian for salt...)

I think this is what you need.



More information about the Python-list mailing list