Your IP : 216.73.216.213
Bd\R � @ s� d Z d Z d d d g Z d d l Td d l m Z y d d l Z e j Z Wn$ e k
rt d d l
Z
e
Z Yn XGd d � d e � Z d d
d � Z e j
Z
e j Z d S)a� SHA-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_size�SHA1Hash� )�*)�HashAlgoNc @ sL e Z d Z d Z e d � Z d Z d Z d d d � Z d d d � Z d S)
r zJClass that implements a SHA-1 hash
:undocumented: block_size
z+� �@ Nc C s t j | t | � d S)N)r �__init__�hashFactory)�self�data� r
�B/opt/alt/python35/lib64/python3.5/site-packages/Crypto/Hash/SHA.pyr I s zSHA1Hash.__init__c C s
t | � S)N)r )r r r
r
r r L s zSHA1Hash.new)
�__name__�
__module__�__qualname__�__doc__�bZoidr �
block_sizer r r
r
r
r r 6 s
c C s t � j | � S)a Return 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
)r r )r r
r
r r O s )r Z_revision__�__all__ZCrypto.Util.py3compatZCrypto.Hash.hashalgor ZhashlibZsha1r
�ImportErrorZshar r r r r
r
r
r �<module>$ s