©ÕYfÇã@s›dZddlZddlmZddlZedd„e dƒDƒƒZ edd„e dƒDƒƒZ dZ Gdd „d ƒZ ddd d „ZdS) zxHMAC (Keyed-Hashing for Message Authentication) Python module. Implements the HMAC algorithm as described by RFC 2104. éN)Ú_compare_digestccs|]}|dAVqdS)é\N©)Ú.0Úxrrú)/opt/alt/python35/lib64/python3.5/hmac.pyú sréccs|]}|dAVqdS)é6Nr)rrrrrr sc@s|eZdZdZdZdddd„Zedd„ƒZdd „Zd d „Z d d „Z dd„Z dd„Z dS)ÚHMACz~RFC 2104 HMAC class. Also complies with RFC 4231. This supports the API for Cryptographic Hash Functions (PEP 247). é@Ncsït|ttfƒs.tdt|ƒjƒ‚ˆdkrVtjdtdƒt j ‰t ˆƒrnˆ|_ nBtˆt ƒr˜d‡fdd†|_ nd‡fdd†|_ |j ƒ|_|j ƒ|_|jj|_t|jd ƒr3|jj}|d krVtjd ||jftdƒ|j}n#tjd |jtdƒ|j}||_t|ƒ|kr†|j |ƒjƒ}|t|t|ƒƒ}|jj|jtƒƒ|jj|jtƒƒ|dk rë|j|ƒdS) a1Create 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 %rNz4szHMAC.__init__..cs ˆj|ƒS)N)r)r)rrrr6sÚ block_sizeéz:block_size of %d seems too small; using our default of %d.zs  r