MD5 to long?

Andrew Bennetts andrew-pythonlist at puzzling.org
Sat Apr 26 06:38:19 EDT 2003


On Sat, Apr 26, 2003 at 12:20:34PM +0200, Axel Grune wrote:
> Hi, is there any function which can convert a MD5 or SHA1 sum
> (e.g. fd4cef7a4e607f1fcc920ad6329a6df2df99a4e8) to a long integer?

Yep:

    >>> long('fd4cef7a4e607f1fcc920ad6329a6df2df99a4e8', 16)
    1446090383108487004598230180906600288613882766568L

-Andrew.






More information about the Python-list mailing list