Hacked By AnonymousFox
a
R�f[ � @ s� d dl Zzd dlZW n& ey: dZdZd dlmZ Y n0 e ej
�ZejZd dlZedd� e
d�D ��Zedd� e
d�D ��ZdZG dd� d�Zdd
d�Zdd
� ZdS )� N)�_compare_digestc c s | ]}|d A V qdS )�\ N� ��.0�xr r �)/opt/alt/python39/lib64/python3.9/hmac.py� <genexpr> � r � c c s | ]}|d A V qdS )�6 Nr r r r r r r
c @ sv e Zd ZdZdZddd�Zedd� �Zed d
� �Zedd� �Z ed
d� �Z
dd� Zdd� Zdd� Z
dd� Zdd� ZdS )�HMAC�@ )�_digest_cons�_inner�_outer�
block_size�digest_sizeN� c sF t |ttf�s tdt|�j ��� s,td��t� �r<� | _n,t � t�rXd
� fdd� | _nd� fdd� | _| �� | _ | �� | _
| j
j| _t| j
d�r�| j
j
}|dk r�t�d || jf td
� | j}nt�d| j td
� | j}|| _
t|�|k� r�| �|��� }|�|d�}| j �|�t�� | j
�|�t�� |d u�rB| �|� d S )Nz,key: expected bytes or bytearray, but got %rz'Missing required parameter 'digestmod'.r
c s t �� | �S �N��_hashlib�new��d�� digestmodr r �<lambda>= r
zHMAC.__init__.<locals>.<lambda>c s
� � | �S r �r r r r r r ? r
r � 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__�callabler �strr r r �hasattrr � _warnings�warn� blocksize�RuntimeWarning�len�digest�ljust�update� translate�trans_5C�trans_36)�self�key�msgr r- r r r �__init__&