Your IP : 3.144.89.197


Current Path : /opt/alt/python36/lib64/python3.6/__pycache__/
Upload File :
Current File : //opt/alt/python36/lib64/python3.6/__pycache__/hmac.cpython-36.opt-2.pyc

3

��2a��@shddlZddlmZddlZedd�ed�D��Z	edd�ed�D��Z
dZGdd�d�Zdd	d
�Z
dS)�N)�_compare_digestccs|]}|dAVqdS)�\N�)�.0�xrr�)/opt/alt/python36/lib64/python3.6/hmac.py�	<genexpr>
sr�ccs|]}|dAVqdS)�6Nr)rrrrrrsc@sNeZdZdZddd�Zedd��Zdd�Zd	d
�Zdd�Z	d
d�Z
dd�ZdS)�HMAC�@NcsVt|ttf�s tdt|�j���dkr<tjdtd�t	j
�t��rL�|_n,t�t
�rhd
�fdd�	|_nd�fdd�	|_|j�|_|j�|_|jj|_t|jd�r�|jj}|d	kr�tjd
||jftd�|j}ntjd|jtd�|j}||_t|�|k�r|j|�j�}|j|d�}|jj|jt��|jj|jt��|dk	�rR|j|�dS)Nz,key: expected bytes or bytearray, but got %rz<HMAC() without an explicit digestmod argument is deprecated.��cstj�|�S)N)�_hashlib�new)�d)�	digestmodrr�<lambda>4szHMAC.__init__.<locals>.<lambda>cs
�j|�S)N)r)r)rrrr6s�
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.�)r)r)�
isinstance�bytes�	bytearray�	TypeError�type�__name__�	_warnings�warn�PendingDeprecationWarningrZmd5�callable�digest_cons�str�outer�inner�digest_size�hasattrr�	blocksize�RuntimeWarning�len�digest�ljust�update�	translate�trans_5C�trans_36)�self�key�msgrr'r)rr�__init__sB





z
HMAC.__init__cCsd|jjS)Nzhmac-)r$�name)r0rrrr4Vsz	HMAC.namecCs|jj|�dS)N)r$r,)r0r2rrrr,ZszHMAC.updatecCs:|jj|j�}|j|_|j|_|jj�|_|jj�|_|S)N)�	__class__�__new__r!r%r$�copyr#)r0�otherrrrr7_sz	HMAC.copycCs|jj�}|j|jj��|S)N)r#r7r,r$r*)r0�hrrr�_currentls
z
HMAC._currentcCs|j�}|j�S)N)r:r*)r0r9rrrr*uszHMAC.digestcCs|j�}|j�S)N)r:�	hexdigest)r0r9rrrr;szHMAC.hexdigest)NN)r�
__module__�__qualname__r'r3�propertyr4r,r7r:r*r;rrrrrs
<
	
rcCst|||�S)N)r)r1r2rrrrr�sr)NN)�warningsr�	_operatorrZcompare_digestZhashlibrr�ranger.r/r%rrrrrr�<module>sr

?>