ó J(Zc@s'ddlmZddd„ƒYZdS(iÿÿÿÿ(thexlifytHashAlgocBsVeZdZdZdZdd„Zd„Zd„Zd„Z d„Z dd„Z RS(seA generic class for an abstract cryptographic hash algorithm. :undocumented: block_size cCsGt|dƒr!|jƒ|_n |ƒ|_|rC|j|ƒndS(s•Initialize the hash object. :Parameters: hashFactory : callable An object that will generate the actual hash implementation. *hashFactory* must have a *new()* method, or must be directly callable. data : byte string The very first chunk of the message to hash. It is equivalent to an early call to `update()`. tnewN(thasattrRt_hashtupdate(tselft hashFactorytdata((s6/tmp/pip-build-LvEk9W/pycrypto/Crypto/Hash/hashalgo.pyt__init__"s  cCs|jj|ƒS(s°Continue hashing of a message by consuming the next chunk of data. Repeated calls are equivalent to a single call with the concatenation of all the arguments. In other words: >>> m.update(a); m.update(b) is equivalent to: >>> m.update(a+b) :Parameters: data : byte string The next chunk of the message being hashed. (RR(RR((s6/tmp/pip-build-LvEk9W/pycrypto/Crypto/Hash/hashalgo.pyR5scCs |jjƒS(srReturn the **binary** (non-printable) digest of the message that has been hashed so far. This method does not change the state of the hash object. You can continue updating the object after calling this function. :Return: A byte string of `digest_size` bytes. It may contain non-ASCII characters, including null bytes. (Rtdigest(R((s6/tmp/pip-build-LvEk9W/pycrypto/Crypto/Hash/hashalgo.pyR Gs cCs |jjƒS(sReturn the **printable** digest of the message that has been hashed so far. This method does not change the state of the hash object. :Return: A string of 2* `digest_size` characters. It contains only hexadecimal ASCII digits. (Rt hexdigest(R((s6/tmp/pip-build-LvEk9W/pycrypto/Crypto/Hash/hashalgo.pyR RscCs |jjƒS(s4Return a copy ("clone") of the hash object. The copy will have the same internal state as the original hash object. This can be used to efficiently compute the digests of strings that share a common initial substring. :Return: A hash object of the same type (Rtcopy(R((s6/tmp/pip-build-LvEk9W/pycrypto/Crypto/Hash/hashalgo.pyR \s cCsdS(sReturn a fresh instance of the hash object. Unlike the `copy` method, the internal state of the object is empty. :Parameters: data : byte string The next chunk of the message being hashed. :Return: A hash object of the same type N((RR((s6/tmp/pip-build-LvEk9W/pycrypto/Crypto/Hash/hashalgo.pyRhs N( t__name__t __module__t__doc__tNonet digest_sizet block_sizeR RR R R R(((s6/tmp/pip-build-LvEk9W/pycrypto/Crypto/Hash/hashalgo.pyRs   N((tbinasciiRR(((s6/tmp/pip-build-LvEk9W/pycrypto/Crypto/Hash/hashalgo.pyts