Submit
Path:
~
/
/
opt
/
alt
/
python37
/
lib64
/
python3.7
/
site-packages
/
Crypto
/
Hash
/
__pycache__
/
File Content:
HMAC.cpython-37.pyc
B ��c� � @ sF d Z dZdddgZddlmZ ddlT dZG d d� d�Zdd d�ZdS )a� HMAC (Hash-based Message Authentication Code) algorithm HMAC is a MAC defined in RFC2104_ and FIPS-198_ and constructed using a cryptograpic hash algorithm. It is usually named *HMAC-X*, where *X* is the hash algorithm; for instance *HMAC-SHA1* or *HMAC-MD5*. The strength of an HMAC depends on: - the strength of the hash algorithm - the length and entropy of the secret key An example of possible usage is the following: >>> from Crypto.Hash import HMAC >>> >>> secret = b'Swordfish' >>> h = HMAC.new(secret) >>> h.update(b'Hello') >>> print h.hexdigest() .. _RFC2104: http://www.ietf.org/rfc/rfc2104.txt .. _FIPS-198: http://csrc.nist.gov/publications/fips/fips198/fips-198a.pdf z$Id$�new�digest_size�HMAC� )�strxor_c)�*Nc @ s>