Is anybody knows about a linkable, quick MD5/SHA1 calculator library ?

Fredrik Lundh fredrik at
Mon May 29 21:50:03 CEST 2006

DurumDara wrote:

> I use the Python standard modules, but I think that it can be faster if 
> I use C, or other module for it.

Python's MD5 and SHA-1 code is written in C, and is quite fast:

python -m timeit -s "import sha; s =; S = '*'*1000000" 
100 loops, best of 3: 12.2 msec per loop

python -m timeit -s "import md5; s =; S = '*'*1000000" 
100 loops, best of 3: 6.45 msec per loop

are you sure it's really a CPU-bound problem?


More information about the Python-list mailing list