Perl's Crypt::PasswdMD5

Jeff Epler jepler at unpythonic.net
Wed Aug 4 20:07:27 EDT 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.

Jeff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20040804/e9b62897/attachment.sig>


More information about the Python-list mailing list