[Python-Dev] hashlib - faster md5/sha, adds sha256/512 support

Gregory P. Smith greg at electricrain.com
Sun Jun 12 05:47:23 CEST 2005


I have finished up the hashlib work I started on in feb/march for
patch 1121611 and 935454 after some discussion on this list.  The full
patch including tests and module documentation has been posted in the
sf patch 1121611 as hashlib-008.

I believe it is done and ready and would like to commit it after a
review.  Let the reviewing begin!

For easy viewing, here's what the module documentation looks like:

 http://electricrain.com/greg/hashlib-py25-doc/module-hashlib.html

The code is in the hashlib-008.patch file:  http://redirx.com/?3e19

hashlib incorporates both the 1121611 openssl hash support and the
935454 sha256+sha512 module support into a single hashlib module that
picks the fastest implementation of each algorithm to use.  OpenSSLs
implementations of md5 and sha1 are nearly 2x as fast as the existing
python builtin versions.  The (now legacy) md5 and sha modules are
turned into simple stubs that use hashlib.

The actual sourceforge patch tracker entries:

 https://sourceforge.net/tracker/?func=detail&aid=1121611&group_id=5470&atid=305470
 https://sourceforge.net/tracker/?func=detail&aid=935454&group_id=5470&atid=305470

Greg



More information about the Python-Dev mailing list