ó
Bd\Rc           @   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
 rs d d l Z e Z n Xd e f d	     YZ
 d d
  Z e
 j Z e
 j Z d S(   sŚ  MD5 cryptographic hash algorithm.

MD5 is specified in RFC1321_ and produces the 128 bit digest of a message.

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

MD5 stand for Message Digest version 5, and it was invented by Rivest in 1991.

This algorithm is insecure. Do not use it for new designs.

.. _RFC1321: http://tools.ietf.org/html/rfc1321 
s   $Id$t   newt   digest_sizet   MD5Hashi˙˙˙˙(   t   *(   t   HashAlgoNc           B   s>   e  Z d  Z e d  Z d Z d Z d d  Z d d  Z	 RS(   sI   Class that implements an MD5 hash
    
    :undocumented: block_size
    s
   *H÷i   i@   c         C   s   t  j |  t |  d  S(   N(   R   t   __init__t   hashFactory(   t   selft   data(    (    s.   lib/python2.7/site-packages/Crypto/Hash/MD5.pyR   I   s    c         C   s
   t  |  S(   N(   R   (   R   R   (    (    s.   lib/python2.7/site-packages/Crypto/Hash/MD5.pyR    L   s    N(
   t   __name__t
   __module__t   __doc__t   bt   oidR   t
   block_sizet   NoneR   R    (    (    (    s.   lib/python2.7/site-packages/Crypto/Hash/MD5.pyR   6   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 `MD5Hash.update()`.
        Optional.

    :Return: A `MD5Hash` object
    (   R   R    (   R   (    (    s.   lib/python2.7/site-packages/Crypto/Hash/MD5.pyR    O   s    (   R   t   _revision__t   __all__t   Crypto.Util.py3compatt   Crypto.Hash.hashalgoR   t   hashlibt   md5R   t   ImportErrorR   R   R    R   R   (    (    (    s.   lib/python2.7/site-packages/Crypto/Hash/MD5.pyt   <module>$   s   

	