B Bd\R @sdZdZdddgZddlTddlmZyddlZejZWn e k rXddl Z e ZYnXGd ddeZ d d dZ e j Z e jZdS) aSHA-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 z$Id$new digest_sizeSHA1Hash)*)HashAlgoNc@s4eZdZdZedZdZdZd ddZd dd Z dS) rzJClass that implements a SHA-1 hash :undocumented: block_size z+@NcCst|t|dS)N)r__init__ hashFactory)selfdatar B/opt/alt/python37/lib64/python3.7/site-packages/Crypto/Hash/SHA.pyr IszSHA1Hash.__init__cCst|S)N)r)r r r r rrLsz SHA1Hash.new)N)N) __name__ __module__ __qualname____doc__bZoidr block_sizer rr r r rr6s   cCs t|S)aReturn 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 r r rrOs )N)rZ _revision____all__ZCrypto.Util.py3compatZCrypto.Hash.hashalgorZhashlibZsha1r ImportErrorZsharrrrr r r r$s