관리-도구
편집 파일: HMAC.cpython-311.pyc
� O�Dgp � �~ � d dl mZmZ d dlmZ d dlmZ d dlmZ d dlm Z d dl mZ ddgZ G d � de � � Zd d�ZdS )� )�bord�tobytes)� unhexlify)�MD5)�BLAKE2s)�strxor)�get_random_bytes�new�HMACc �D � e Zd ZdZdd�Zd� Zd� Zd� Zd� Zd � Z d � Z d� 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 �� � |�t }|�d}|j | _ || _ t |t � � r|� � � } t |� � |j k r|d|j t |� � z z z }nD|� |� � � � � }|d|j t |� � z z z }n# t $ r t d� � �w xY wt |dt |� � z � � }|� |� � | _ | j � |� � t |dt |� � z � � }|� |� � | _ d S )Nr � zHash type incompatible to HMAC� 6� \)r �digest_size� _digestmod� isinstance� memoryviewr �len� block_sizer �digest�AttributeError� ValueErrorr �_inner�update�_outer)�self�key�msg� digestmod�key_0�hash_k� key_0_ipad� key_0_opads �r/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib64/python3.11/site-packages/Crypto/Hash/HMAC.py�__init__z HMAC.__init__6 se � ����I��;��C� %�0���#����c�:�&�&� ��+�+�-�-�C� ?��3�x�x�9�/�/�/��g��)=��C���)H�I�I��� #���s�+�+�2�2�4�4����I�,@�3�v�;�;�,N�!O�O����� ?� ?� ?��=�>�>�>� ?���� �E�7�S��Z�Z�#7�8�8� � �m�m�J�/�/�������3���� �E�7�S��Z�Z�#7�8�8� � �m�m�J�/�/����s �A:C �C c �: � | 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 s r&