[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@18.119.108.98: ~ $
�

1�Dg�$���ddlmZddlmZmZddlmZddlmZm	Z	m
Z
mZmZm
Z
mZedd��ZGd�de��Zd	�Zd
S)�)�	unhexlify)�bord�tobytes)�get_random_bytes)�load_pycryptodome_raw_lib�VoidPointer�SmartPointer�create_string_buffer�get_raw_buffer�c_size_t�c_uint8_ptrzCrypto.Hash._BLAKE2ba�
                        int blake2b_init(void **state,
                                         const uint8_t *key,
                                         size_t key_size,
                                         size_t digest_size);
                        int blake2b_destroy(void *state);
                        int blake2b_update(void *state,
                                           const uint8_t *buf,
                                           size_t len);
                        int blake2b_digest(const void *state,
                                           uint8_t digest[64]);
                        int blake2b_copy(const void *src, void *dst);
                        c�@�eZdZdZdZd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
S)�BLAKE2b_Hasha�A BLAKE2b hash object.
    Do not instantiate directly. Use the :func:`new` function.

    :ivar oid: ASN.1 Object ID
    :vartype oid: string

    :ivar block_size: the size in bytes of the internal message block,
                      input to the compression function
    :vartype block_size: integer

    :ivar digest_size: the size in bytes of the resulting hash
    :vartype digest_size: integer
    �@c	��||_||_d|_|dvr|sdt|��z|_t��}t�|���t|��tt|����t|����}|rtd|z���t|���tj��|_|r|�|��dSdS)NF)�� �0rz1.3.6.1.4.1.1722.12.2.1.z$Error %d while instantiating BLAKE2b)�digest_size�_update_after_digest�_digest_done�str�oidr�_raw_blake2b_lib�blake2b_init�
address_ofr
r�len�
ValueErrorr	�get�blake2b_destroy�_state�update)�self�data�key�digest_bytes�update_after_digest�state�results       �u/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib64/python3.11/site-packages/Crypto/Hash/BLAKE2b.py�__init__zBLAKE2b_Hash.__init__Ls��(���$7��!�!����+�+�+�C�+�1�C��4E�4E�E�D�H��
�
��!�.�.�u�/?�/?�/A�/A�/:�3�/?�/?�/7��C���/A�/A�/7��/E�/E�1�1��
�	N��C�f�L�M�M�M�"�5�9�9�;�;�#3�#C�E�E����	��K�K�������	�	�c	��|jr|jstd���t�|j���t|��tt|������}|rtd|z���|S)z�Continue hashing of a message by consuming the next chunk of data.

        Args:
            data (bytes/bytearray/memoryview): The next chunk of the message being hashed.
        z8You can only call 'digest' or 'hexdigest' on this objectz#Error %d while hashing BLAKE2b data)rr�	TypeErrorr�blake2b_updater!rr
rrr)r#r$r)s   r*r"zBLAKE2b_Hash.updatefs�����	X�T�%>�	X��V�W�W�W�!�0�0�����1B�1B�1<�T�1B�1B�19�#�d�)�)�1D�1D�F�F���	M��B�V�K�L�L�L��r,c���td��}t�|j���|��}|rtd|z���d|_t|��d|j�S)z�Return the **binary** (non-printable) digest of the message that has been hashed so far.

        :return: The hash digest, computed over the data processed so far.
                 Binary form.
        :rtype: byte string
        rz&Error %d while creating BLAKE2b digestTN)	r
r�blake2b_digestr!rrrrr)r#�bfrr)s   r*�digestzBLAKE2b_Hash.digestxsx��#�2�&�&��!�0�0�����1B�1B�14�6�6���	P��E��N�O�O�O� ����c�"�"�#4�D�$4�#4�5�5r,c�~�d�d�t|�����D����S)z�Return the **printable** digest of the message that has been hashed so far.

        :return: The hash digest, 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*BLAKE2b_Hash.hexdigest.<locals>.<listcomp>�s#��G�G�G�Q���a���(�G�G�Gr,)�join�tupler3)r#s r*�	hexdigestzBLAKE2b_Hash.hexdigest�s5���w�w�G�G�%����
�
�2F�2F�G�G�G�H�H�Hr,c��td��}td||���}td||������}|���|���krtd���dS)a`Verify that a given **binary** MAC (computed by another party)
        is valid.

        Args:
          mac_tag (bytes/bytearray/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%r$zMAC check failedN)r�newr3r)r#�mac_tag�secret�mac1�mac2s     r*�verifyzBLAKE2b_Hash.verify�ss��"�"�%�%���s��W�=�=�=���s��T�[�[�]�]�C�C�C���;�;�=�=�D�K�K�M�M�)�)��/�0�0�0�*�)r,c�d�|�tt|������dS)anVerify 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)rFrr)r#�hex_mac_tags  r*�	hexverifyzBLAKE2b_Hash.hexverify�s,��	
���I�g�k�2�2�3�3�4�4�4�4�4r,c�>�d|vrd|vr
|j|d<tdi|��S)zQReturn a new instance of a BLAKE2b hash object.
        See :func:`new`.
        r&r@�)rrA)r#�kwargss  r*rAzBLAKE2b_Hash.new�s6��
��'�'�M��,G�,G�%)�%5�F�>�"��}�}�V�}�}�r,N)�__name__�
__module__�__qualname__�__doc__�
block_sizer+r"r3r<rFrIrArKr,r*rr:s����������J����4���$6�6�6�&I�I�I�1�1�1�*5�5�5�����r,rc�Z�|�dd��}|�dd��}|�dd��}|�dd��}d||fvrtd���d||fkrd	}|�d
|cxkrd	ksntd���n)d|cxkrd
krnn|dzrtd���|dz}|�dd��}t|��d	krtd���|rtdt	|��z���t||||��S)a�Create a new hash object.

    Args:
        data (bytes/bytearray/memoryview):
            Optional. The very first chunk of the message to hash.
            It is equivalent to an early call to :meth:`BLAKE2b_Hash.update`.
        digest_bytes (integer):
            Optional. The size of the digest, in bytes (1 to 64). Default is 64.
        digest_bits (integer):
            Optional and alternative to ``digest_bytes``.
            The size of the digest, in bits (8 to 512, in steps of 8).
            Default is 512.
        key (bytes/bytearray/memoryview):
            Optional. The key to use to compute the MAC (1 to 64 bytes).
            If not specified, no key will be used.
        update_after_digest (boolean):
            Optional. By default, a hash object cannot be updated anymore after
            the digest is computed. When this flag is ``True``, such check
            is no longer enforced.

    Returns:
        A :class:`BLAKE2b_Hash` hash object
    r$Nr'Fr&r@z*Only one digest parameter must be provided)NNr�z!'digest_bytes' not in range 1..64�iz2'digest_bits' not in range 8..512, with steps of 8r%r,z"BLAKE2b key cannot exceed 64 byteszUnknown parameters: )�popr.rrrr)rLr$r'r&r@r%s      r*rArA�su��2�:�:�f�d�#�#�D� �*�*�%:�E�B�B���:�:�n�d�3�3�L��*�*�]�D�1�1�K��L�+�.�.�.��D�E�E�E���k�2�2�2������\�'�'�'�'�R�'�'�'�'��@�A�A�A�(��[�'�'�'�'�C�'�'�'�'�'�[�1�_�'��/�0�0�
0�"�a�'��
�*�*�U�C�
 �
 �C�
�3�x�x�"�}�}��=�>�>�>�
�>��.��V���<�=�=�=���c�<�1D�E�E�Er,N)�binasciir�Crypto.Util.py3compatrr�
Crypto.Randomr�Crypto.Util._raw_apirrr	r
rrr
r�objectrrArKr,r*�<module>r[s��>������/�/�/�/�/�/�/�/�*�*�*�*�*�*�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�-�,�-C��
�
�� H�H�H�H�H�6�H�H�H�V2F�2F�2F�2F�2Fr,

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