B
    Bd\R½  ã               @   sf   d Z dZdddgZddlT ddlmZ ddlm  mZ eZ	G d	d„ deƒZ
dd
d„Ze
jZe
jZdS )af  RIPEMD-160 cryptographic hash algorithm.

RIPEMD-160_ produces the 160 bit digest of a message.

    >>> from Crypto.Hash import RIPEMD
    >>>
    >>> h = RIPEMD.new()
    >>> h.update(b'Hello')
    >>> print h.hexdigest()

RIPEMD-160 stands for RACE Integrity Primitives Evaluation Message Digest
with a 160 bit digest. It was invented by Dobbertin, Bosselaers, and Preneel.

This algorithm is considered secure, although it has not been scrutinized as
extensively as SHA-1. Moreover, it provides an informal security level of just
80bits.

.. _RIPEMD-160: http://homes.esat.kuleuven.be/~bosselae/ripemd160.html
z$Id$ÚnewÚdigest_sizeÚRIPEMD160Hashé    )Ú*)ÚHashAlgoNc               @   s4   e Zd ZdZedƒZdZdZd
dd„Zddd	„Z	dS )r   zNClass that implements a RIPMD-160 hash
    
    :undocumented: block_size
    z+$é   é@   Nc             C   s   t  | t|¡ d S )N)r   Ú__init__ÚhashFactory)ÚselfÚdata© r   ú1lib/python3.7/site-packages/Crypto/Hash/RIPEMD.pyr	   F   s    zRIPEMD160Hash.__init__c             C   s   t |ƒS )N)r   )r   r   r   r   r   r   I   s    zRIPEMD160Hash.new)N)N)
Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚbZoidr   Ú
block_sizer	   r   r   r   r   r   r   3   s   

c             C   s   t ƒ  | ¡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 `RIPEMD160Hash.update()`.
        Optional.

    :Return: A `RIPEMD160Hash` object
    )r   r   )r   r   r   r   r   L   s    )N)r   Z_revision__Ú__all__ZCrypto.Util.py3compatZCrypto.Hash.hashalgor   ZCrypto.Hash._RIPEMD160ZHashZ
_RIPEMD160r
   r   r   r   r   r   r   r   r   Ú<module>'   s   

