OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Pete Chown (Pete.Chownskygate.co.uk)
Date: Mon May 21 2001 - 07:48:49 CDT

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    lcs Mixmaster Remailer wrote:

    > What would be a good way, in Python, to turn a SHA hash digest into a
    > numeric value?
    >
    > import sha
    > hash = sha.sha('String to hash').digest()
    >
    > This leaves "hash" holding a 20 character string. What is the best way
    > to make it a 160 bit long integer? Merci,

    long(sha.sha('String to hash').hexdigest(), 16)

    -- 
    Pete