o
    Bd\R½  ã                   @   sd   d Z dZg d¢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   úD/var/www/html/env/lib/python3.10/site-packages/Crypto/Hash/RIPEMD.pyr
   F   s   zRIPEMD160Hash.__init__c                 C   s   t |ƒS r	   )r   r   r   r   r   r   I   s   zRIPEMD160Hash.newr	   )
Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚbÚoidr   Ú
block_sizer
   r   r   r   r   r   r   3   s    
r   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   r   r	   )r   Ú_revision__Ú__all__ÚCrypto.Util.py3compatÚCrypto.Hash.hashalgor   ÚCrypto.Hash._RIPEMD160ÚHashÚ
_RIPEMD160r   r   r   r   r   r   r   r   r   Ú<module>   s   

