AlkantarClanX12
Current Path : /opt/alt/python35/lib64/python3.5/__pycache__/ |
Current File : //opt/alt/python35/lib64/python3.5/__pycache__/hmac.cpython-35.opt-1.pyc |
��Yf� � @ s� d Z d d l Z d d l m Z d d l Z e d d � e d � D� � Z e d d � e d � D� � Z d Z Gd d � d � Z d d d d � Z d S)zxHMAC (Keyed-Hashing for Message Authentication) Python module. Implements the HMAC algorithm as described by RFC 2104. � N)�_compare_digestc c s | ] } | d AVq d S)�\ N� )�.0�xr r �)/opt/alt/python35/lib64/python3.5/hmac.py� <genexpr> s r � c c s | ] } | d AVq d S)�6 Nr )r r r r r r s c @ s| e Z d Z d Z d Z d d d d � Z e d d � � Z d d � Z d d � Z d d � Z d d � Z d d � Z d S)�HMACz~RFC 2104 HMAC class. Also complies with RFC 4231. This supports the API for Cryptographic Hash Functions (PEP 247). �@ Nc s� t | t t f � s. t d t | � j � � � d k rV t j d t d � t j � t � � rn � | _ nB t � t � r� d � f d d � | _ n d � f d d � | _ | j � | _ | j � | _ | j j | _ t | j d � r3| j j } | d k rVt j d | | j f t d � | j } n# t j d | j t d � | j } | | _ t | � | k r�| j | � j � } | t | t | � � } | j j | j t � � | j j | j t � � | d k r�| j | � d S) a1 Create a new HMAC object. key: key for the keyed hash object. msg: Initial input for the hash, if provided. digestmod: A module supporting PEP 247. *OR* A hashlib constructor returning a new hash object. *OR* A hash name suitable for hashlib.new(). Defaults to hashlib.md5. Implicit default to hashlib.md5 is deprecated and will be removed in Python 3.6. Note: key and msg must be a bytes or bytearray objects. z,key: expected bytes or bytearray, but got %rNz<HMAC() without an explicit digestmod argument is deprecated.� � c s t j � | � S)N)�_hashlib�new)�d)� digestmodr r �<lambda>4 s zHMAC.__init__.<locals>.<lambda>c s � j | � S)N)r )r )r r r r 6 s � block_size� z:block_size of %d seems too small; using our default of %d.z<No block_size attribute on given digest object; Assuming %d.)� isinstance�bytes� bytearray� TypeError�type�__name__� _warnings�warn�PendingDeprecationWarningr Zmd5�callable�digest_cons�str�outer�inner�digest_size�hasattrr � blocksize�RuntimeWarning�len�digest�update� translate�trans_5C�trans_36)�self�key�msgr r&