Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/Crypto/Hash/__pycache__/HMAC.cpython-39.pyc
Ðазад
a c�h~ � @ sv d dl mZmZmZ d dlmZ d dlmZ d dlmZ d dl m Z d dlmZ ddgZ G d d� de�Zd dd�ZdS )� )�bord�tobytes�_memoryview)� unhexlify)�MD5)�BLAKE2s)�strxor)�get_random_bytes�new�HMACc @ sR e Zd ZdZddd�Zdd� Zdd � Zd d� Zdd � Zdd� Z dd� Z dd� ZdS )r z�An HMAC hash object. Do not instantiate directly. Use the :func:`new` function. :ivar digest_size: the size in bytes of the resulting MAC tag :vartype digest_size: integer � Nc C s� |d u rt }|d u rd}|j| _|| _t|t�r8|�� }zNt|�|jkr`|d|jt|� }n$|�|�� � }|d|jt|� }W n t y� td��Y n0 t|dt|� �}|�|�| _ | j �|� t|dt|� �}|�|�| _d S )Nr � zHash type incompatible to HMAC� 6� \)r �digest_size� _digestmod� isinstancer r �len� block_sizer �digest�AttributeError� ValueErrorr �_inner�update�_outer)�self�key�msg� digestmodZkey_0Zhash_kZ key_0_ipadZ key_0_opad� r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/Crypto/Hash/HMAC.py�__init__6 s( z HMAC.__init__c C s | j �|� | S )z�Authenticate the next chunk of message. Args: data (byte string/byte array/memoryview): The next chunk of data )r r )r r r r r r _ s zHMAC.updatec C s | j �| j| j||�}|S )z2Carry out the expensive inner loop for PBKDF2-HMAC)r �_pbkdf2_hmac_assistr r )r Zfirst_digestZ iterations�resultr r r r"