Perl's Crypt::PasswdMD5

Jeff Epler jepler at
Thu Aug 5 02:07:27 CEST 2004

On Wed, Aug 04, 2004 at 12:23:09PM -0400, Jp Calderone wrote:
> >>> import crypt
> >>> crypt.crypt('foo bar', '$1$salt')
> '$1$salt$LAwA5cAKtcsGTJGx.bMTC1'

Support for MD5 passwords is a GNU extension (according to my manpage
for crypt(3).  Python directly calls the platform's crypt(), so if your
system's crypt is extended, Python will benefit from it.

Whether this helps the OP, I dunno.

I glanced at the Perl module he mentioned.  It looks pretty dull.  You
could implement it in Python using the md5 module pretty quickly,
assuming you had some test vectors to test against.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <>

More information about the Python-list mailing list