ok

Mini Shell

Direktori : /opt/alt/python38/lib64/python3.8/site-packages/Crypto/Hash/__pycache__/
Upload File :
Current File : //opt/alt/python38/lib64/python3.8/site-packages/Crypto/Hash/__pycache__/hashalgo.cpython-38.pyc

U

Bd\R��@sddlmZGdd�d�ZdS)�)�hexlifyc@sLeZdZdZdZdZddd�Zdd�Zdd�Zd	d
�Z	dd�Z
dd
d�ZdS)�HashAlgozeA generic class for an abstract cryptographic hash algorithm.
    
    :undocumented: block_size
    NcCs0t|d�r|��|_n|�|_|r,|�|�dS)a�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()`.
        �newN)�hasattrr�_hash�update)�selfZhashFactory�data�r
�/hashalgo.py�__init__"s

zHashAlgo.__init__cCs|j�|�S)a�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	r
r
rr5szHashAlgo.updatecCs
|j��S)arReturn 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.
        )r�digest�rr
r
rrGs	zHashAlgo.digestcCs
|j��S)aReturn 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.
        )r�	hexdigestrr
r
rrRszHashAlgo.hexdigestcCs
|j��S)a4Return 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
        )r�copyrr
r
rr\s
z
HashAlgo.copycCsdS)aReturn 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
        Nr
r
r
r
rrhszHashAlgo.new)N)N)�__name__�
__module__�__qualname__�__doc__Zdigest_sizeZ
block_sizerrrrrrr
r
r
rrs

rN)Zbinasciirrr
r
r
r�<module>s

Zerion Mini Shell 1.0