[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@18.189.192.193: ~ $
�

1�Dgp��~�ddlmZmZddlmZddlmZddlmZddlm	Z	ddl
mZddgZGd	�de
��Zd
d�ZdS)�)�bord�tobytes)�	unhexlify)�MD5)�BLAKE2s)�strxor)�get_random_bytes�new�HMACc�D�eZdZdZdd�Zd�Zd�Zd�Zd�Zd	�Z	d
�Z
d�ZdS)
rz�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
|��|jkr|d|jt
|��z
zz}nD|�|���	��}|d|jt
|��z
zz}n#t$rtd���wxYwt|dt
|��z��}|�|��|_
|j
�|��t|dt
|��z��}|�|��|_dS)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__6se�����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
        )rr)rr s  r&rzHMAC.update_s��	
����3�����r
c�T�|j�|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_assistis2����4�4�$(�K�$(�K�$0�$.�	0�0��
�
r
c��td|j���}|j���|_|j���|_|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!)rrr�copyr)r�new_hmacs  r&r/z	HMAC.copyssI����t��?�?�?���+�*�*�,�,����+�*�*�,�,����r
c��|j���}|�|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
        )rr/rrr)r�frozen_outer_hashs  r&rzHMAC.digest�sL��!�K�,�,�.�.��� � ���!3�!3�!5�!5�6�6�6� �'�'�)�)�)r
c��td��}tjd||���}tjd||������}|���|���krt	d���dS)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)r	rr
rr)r�mac_tag�secret�mac1�mac2s     r&�verifyzHMAC.verify�sw��"�"�%�%���{�s��W�E�E�E���{�s��T�[�[�]�]�K�K�K���;�;�=�=�D�K�K�M�M�)�)��/�0�0�0�*�)r
c�~�d�d�t|�����D����S)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
        �c�2�g|]}dt|��z��S)z%02x)r)�.0�xs  r&�
<listcomp>z"HMAC.hexdigest.<locals>.<listcomp>�s3��7�7�7����a���(�7�7�7r
)�join�tupler)rs r&�	hexdigestzHMAC.hexdigest�sF���w�w�7�7�!&�t�{�{�}�}�!5�!5�7�7�7�8�8�	8r
c�d�|�tt|������dS)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�2�3�3�4�4�4�4�4r
�r
N)�__name__�
__module__�__qualname__�__doc__r'rr*r/rr<rErH�r
r&rr.s���������'0�'0�'0�'0�R���������&*�*�*�1�1�1�(	8�	8�	8�
5�
5�
5�
5�
5r
r
Nc�$�t|||��S)a=Create 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:`Crypto.Hash.MD5`.

    Returns:
        An :class:`HMAC` object
    )r)rr r!s   r&r
r
�s��&��S�)�$�$�$r
rI)�Crypto.Util.py3compatrr�binasciir�Crypto.Hashrr�Crypto.Util.strxorr�
Crypto.Randomr	�__all__�objectrr
rNr
r&�<module>rWs���D0�/�/�/�/�/�/�/�������������������%�%�%�%�%�%�*�*�*�*�*�*��&�/��Q5�Q5�Q5�Q5�Q5�6�Q5�Q5�Q5�h%�%�%�%�%�%r

Filemanager

Name Type Size Permission Actions
BLAKE2b.cpython-311.pyc File 10.06 KB 0644
BLAKE2s.cpython-311.pyc File 10.07 KB 0644
CMAC.cpython-311.pyc File 11.67 KB 0644
HMAC.cpython-311.pyc File 7.71 KB 0644
KMAC128.cpython-311.pyc File 6.98 KB 0644
KMAC256.cpython-311.pyc File 2.13 KB 0644
KangarooTwelve.cpython-311.pyc File 9.55 KB 0644
MD2.cpython-311.pyc File 6.2 KB 0644
MD4.cpython-311.pyc File 6.68 KB 0644
MD5.cpython-311.pyc File 7.49 KB 0644
Poly1305.cpython-311.pyc File 9.63 KB 0644
RIPEMD.cpython-311.pyc File 410 B 0644
RIPEMD160.cpython-311.pyc File 6.45 KB 0644
SHA.cpython-311.pyc File 362 B 0644
SHA1.cpython-311.pyc File 7.53 KB 0644
SHA224.cpython-311.pyc File 7.79 KB 0644
SHA256.cpython-311.pyc File 7.78 KB 0644
SHA384.cpython-311.pyc File 7.78 KB 0644
SHA3_224.cpython-311.pyc File 6.92 KB 0644
SHA3_256.cpython-311.pyc File 6.92 KB 0644
SHA3_384.cpython-311.pyc File 7.14 KB 0644
SHA3_512.cpython-311.pyc File 6.93 KB 0644
SHA512.cpython-311.pyc File 8.58 KB 0644
SHAKE128.cpython-311.pyc File 4.53 KB 0644
SHAKE256.cpython-311.pyc File 4.53 KB 0644
TupleHash128.cpython-311.pyc File 4.91 KB 0644
TupleHash256.cpython-311.pyc File 1.84 KB 0644
__init__.cpython-311.pyc File 424 B 0644
cSHAKE128.cpython-311.pyc File 6.59 KB 0644
cSHAKE256.cpython-311.pyc File 1.11 KB 0644
keccak.cpython-311.pyc File 7.67 KB 0644