ó
Bd\Rc           @   s   d  Z  d Z d d d g Z d d l Td d l m Z d d l j j Z e Z	 d e f d	     YZ
 d d
  Z e
 j Z e
 j Z d S(   sf  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
s   $Id$t   newt   digest_sizet   RIPEMD160Hashi˙˙˙˙(   t   *(   t   HashAlgoNc           B   s>   e  Z d  Z e d  Z d Z d Z d d  Z d d  Z	 RS(   sN   Class that implements a RIPMD-160 hash
    
    :undocumented: block_size
    s   +$i   i@   c         C   s   t  j |  t |  d  S(   N(   R   t   __init__t   hashFactory(   t   selft   data(    (    s1   lib/python2.7/site-packages/Crypto/Hash/RIPEMD.pyR   F   s    c         C   s
   t  |  S(   N(   R   (   R   R   (    (    s1   lib/python2.7/site-packages/Crypto/Hash/RIPEMD.pyR    I   s    N(
   t   __name__t
   __module__t   __doc__t   bt   oidR   t
   block_sizet   NoneR   R    (    (    (    s1   lib/python2.7/site-packages/Crypto/Hash/RIPEMD.pyR   3   s   
c         C   s   t    j |   S(   s  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   (    (    s1   lib/python2.7/site-packages/Crypto/Hash/RIPEMD.pyR    L   s    (   R   t   _revision__t   __all__t   Crypto.Util.py3compatt   Crypto.Hash.hashalgoR   t   Crypto.Hash._RIPEMD160t   Hasht
   _RIPEMD160R   R   R   R    R   R   (    (    (    s1   lib/python2.7/site-packages/Crypto/Hash/RIPEMD.pyt   <module>'   s   
	