Pc@sdZdZdddgZddlTddlmZyddlZejZWn#e k rsddl Z e ZnXdefd YZ dd Z e jZe jZdS( sSHA-1 cryptographic hash algorithm. SHA-1_ produces the 160 bit digest of a message. >>> from Crypto.Hash import SHA >>> >>> h = SHA.new() >>> h.update(b'Hello') >>> print h.hexdigest() *SHA* stands for Secure Hash Algorithm. This algorithm is not considered secure. Do not use it for new designs. .. _SHA-1: http://csrc.nist.gov/publications/fips/fips180-2/fips180-2.pdf s$Id$tnewt digest_sizetSHA1Hashi(t*(tHashAlgoNcBs>eZdZedZdZdZddZddZ RS(sJClass that implements a SHA-1 hash :undocumented: block_size s+ii@cCstj|t|dS(N(Rt__init__t hashFactory(tselftdata((s*..\python\site-packages\Crypto\Hash\SHA.pyRIscCs t|S(N(R(RR((s*..\python\site-packages\Crypto\Hash\SHA.pyRLsN( t__name__t __module__t__doc__tbtoidRt block_sizetNoneRR(((s*..\python\site-packages\Crypto\Hash\SHA.pyR6s   cCstj|S(sReturn a fresh instance of the hash object. :Parameters: data : byte string The very first chunk of the message to hash. It is equivalent to an early call to `SHA1Hash.update()`. Optional. :Return: A `SHA1Hash` object (RR(R((s*..\python\site-packages\Crypto\Hash\SHA.pyROs (R t _revision__t__all__tCrypto.Util.py3compattCrypto.Hash.hashalgoRthashlibtsha1Rt ImportErrortshaRRRRR(((s*..\python\site-packages\Crypto\Hash\SHA.pyt$s