403Webshell
Server IP : 35.80.110.71  /  Your IP : 216.73.216.221
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/Cryptodome/Hash/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/Cryptodome/Hash/__pycache__/HMAC.cpython-312.pyc
�

��e�����ddlmZmZddlmZddlmZddlmZddl	m
Z
ddgZdd	d
ddd
dddddd�Zej�D��cic]\}}||��
c}}ZGd�de�Zdd�Zycc}}w)�)�bord�tobytes)�	unhexlify)�BLAKE2s)�strxor)�get_random_bytes�new�HMACz1.2.840.113549.2.7z1.2.840.113549.2.8z1.2.840.113549.2.9z1.2.840.113549.2.10z1.2.840.113549.2.11z1.2.840.113549.2.12z1.2.840.113549.2.13z2.16.840.1.101.3.4.2.13z2.16.840.1.101.3.4.2.14z2.16.840.1.101.3.4.2.15z2.16.840.1.101.3.4.2.16)z
1.3.14.3.2.26z2.16.840.1.101.3.4.2.4z2.16.840.1.101.3.4.2.1z2.16.840.1.101.3.4.2.2z2.16.840.1.101.3.4.2.3z2.16.840.1.101.3.4.2.5z2.16.840.1.101.3.4.2.6z2.16.840.1.101.3.4.2.7z2.16.840.1.101.3.4.2.8z2.16.840.1.101.3.4.2.9z2.16.840.1.101.3.4.2.10c�B�eZdZdZdd�Zd�Zd�Zd�Zd�Zd�Z	d	�Z
d
�Zy)r
aBAn 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

    :ivar oid: the ASN.1 object ID of the HMAC algorithm.
               Only present if the algorithm was officially assigned one.
    Nc��|�ddlm}|}|�d}|j|_||_	t|j
|_t|t�r|j�}	t|�|jkr|d|jt|�z
zz}n=|j|�j�}|d|jt|�z
zz}t!|dt|�z�}|j|�|_|j"j%|�t!|dt|�z�}|j|�|_y#ttf$rY��wxYw#t$rtd��wxYw)Nr)�MD5��zHash type incompatible to HMAC�6�\)�Cryptodome.Hashr
�digest_size�
_digestmod�_hash2hmac_oid�oid�KeyError�AttributeError�
isinstance�
memoryviewr�len�
block_sizer	�digest�
ValueErrorr�_inner�update�_outer)	�self�key�msg�	digestmodr
�key_0�hash_k�
key_0_ipad�
key_0_opads	         �6/usr/lib/python3/dist-packages/Cryptodome/Hash/HMAC.py�__init__z
HMAC.__init__Hsb����+��I��;��C�%�0�0���#���	�%�i�m�m�4�D�H��c�:�&��+�+�-�C�
	?��3�x�9�/�/�/��g��)=�)=��C��)H�I�I��#���s�+�2�2�4����I�,@�,@�3�v�;�,N�!O�O���E�7�S��Z�#7�8�
� �m�m�J�/��������3���E�7�S��Z�#7�8�
� �m�m�J�/����;�.�)�	��	���	?��=�>�>�	?�s�E
�!A4E#�
E �E �#E8c�<�|jj|�|S)z�Authenticate the next chunk of message.

        Args:
            data (byte string/byte array/memoryview): The next chunk of data
        )rr )r"r$s  r*r zHMAC.updatexs��	
�����3���rc�j�|jj|j|j||�}|S)z2Carry out the expensive inner loop for PBKDF2-HMAC)r�_pbkdf2_hmac_assistrr!)r"�first_digest�
iterations�results    r*r.zHMAC._pbkdf2_hmac_assist�s3�����4�4�$(�K�K�$(�K�K�$0�$.�	0��
�
rc��td|j��}|jj�|_|jj�|_|S)a+Return a copy ("clone") of the HMAC object.

        The copy will have the same internal state as the original HMAC
        object.
        This can be used to efficiently compute the MAC tag of byte
        strings that share a common initial substring.

        :return: An :class:`HMAC`
        sfake key)r%)r
rr�copyr!)r"�new_hmacs  r*r3z	HMAC.copy�sC����t���?���+�+�*�*�,����+�+�*�*�,����rc��|jj�}|j|jj	��|j	�S)z�Return the **binary** (non-printable) MAC tag of the message
        authenticated so far.

        :return: The MAC tag digest, computed over the data processed so far.
                 Binary form.
        :rtype: byte string
        )r!r3r rr)r"�frozen_outer_hashs  r*rzHMAC.digest�sA��!�K�K�,�,�.��� � ����!3�!3�!5�6� �'�'�)�)rc���td�}tjd||��}tjd||j���}|j�|j�k7rt	d��y)ahVerify that a given **binary** MAC (computed by another party)
        is valid.

        Args:
          mac_tag (byte string/byte string/memoryview): the expected MAC of the message.

        Raises:
            ValueError: if the MAC does not match. It means that the message
                has been tampered with or that the MAC key is incorrect.
        ��)�digest_bitsr#�datazMAC check failedN)rrr	rr)r"�mac_tag�secret�mac1�mac2s     r*�verifyzHMAC.verify�s]��"�"�%���{�{�s��W�E���{�{�s��T�[�[�]�K���;�;�=�D�K�K�M�)��/�0�0�*rc	��djt|j��D�cgc]}dt|�z��c}�Scc}w)z�Return the **printable** MAC tag of the message authenticated so far.

        :return: The MAC tag, computed over the data processed so far.
                 Hexadecimal encoded.
        :rtype: string
        �z%02x)�join�tuplerr)r"�xs  r*�	hexdigestzHMAC.hexdigest�sD���w�w�!&�t�{�{�}�!5�7����a��(�7�8�	8��7s�Ac�J�|jtt|���y)a~Verify that a given **printable** MAC (computed by another party)
        is valid.

        Args:
            hex_mac_tag (string): the expected MAC of the message,
                as a hexadecimal string.

        Raises:
            ValueError: if the MAC does not match. It means that the message
                has been tampered with or that the MAC key is incorrect.
        N)r@rr)r"�hex_mac_tags  r*�	hexverifyzHMAC.hexverify�s��	
���I�g�k�2�3�4r�rN)�__name__�
__module__�__qualname__�__doc__r+r r.r3rr@rFrI�rr*r
r
=s0���.0�`���&*�1�(	8�
5rNc��t|||�S)aACreate a new MAC object.

    Args:
        key (bytes/bytearray/memoryview):
            key for the MAC object.
            It must be long enough to match the expected security level of the
            MAC.
        msg (bytes/bytearray/memoryview):
            Optional. The very first chunk of the message to authenticate.
            It is equivalent to an early call to :meth:`HMAC.update`.
        digestmod (module):
            The hash to use to implement the HMAC.
            Default is :mod:`Cryptodome.Hash.MD5`.

    Returns:
        An :class:`HMAC` object
    )r
)r#r$r%s   r*r	r	�s��&��S�)�$�$rrJ)�Cryptodome.Util.py3compatrr�binasciirrr�Cryptodome.Util.strxorr�Cryptodome.Randomr�__all__r�items�_hmac2hash_oid�objectr
r	)�k�vs00r*�<module>r[s���D4��#�)�.��&�/��*�2�2�3�3�3�3�7�7�7�8���$2�#7�#7�#9�:�4�1�a�!�Q�$�:��[5�6�[5�|%��C;s�
A'

Youez - 2016 - github.com/yon3zu
LinuXploit