ok

Mini Shell

Direktori : /opt/imunify360/venv/lib/python3.11/site-packages/Crypto/Hash/__pycache__/
Upload File :
Current File : //opt/imunify360/venv/lib/python3.11/site-packages/Crypto/Hash/__pycache__/MD2.cpython-311.pyc

�

f��f����ddlmZddlmZmZmZmZmZmZm	Z	edd��Z
Gd�de��Zd	d�Z
ejZejZdS)
���bord)�load_pycryptodome_raw_lib�VoidPointer�SmartPointer�create_string_buffer�get_raw_buffer�c_size_t�c_uint8_ptrzCrypto.Hash._MD2a�
                        int md2_init(void **shaState);
                        int md2_destroy(void *shaState);
                        int md2_update(void *hs,
                                          const uint8_t *buf,
                                          size_t len);
                        int md2_digest(const void *shaState,
                                          uint8_t digest[20]);
                        int md2_copy(const void *src, void *dst);
                        c�F�eZdZdZdZdZdZdd�Zd�Zd�Z	d�Z
d	�Zdd
�ZdS)�MD2Hasha�An MD2 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
    �z1.2.840.113549.2.2Nc�6�t��}t�|�����}|rt	d|z���t|���tj��|_|r|�	|��dSdS)N� Error %d while instantiating MD2)
r�_raw_md2_lib�md2_init�
address_of�
ValueErrorr�get�md2_destroy�_state�update)�self�data�state�results    �q/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib64/python3.11/site-packages/Crypto/Hash/MD2.py�__init__zMD2Hash.__init__Ks����
�
���&�&�u�'7�'7�'9�'9�:�:���	'��?�%�&�'�'�
'�"�5�9�9�;�;�#/�#;�=�=����	��K�K�������	�	�c	���t�|j���t	|��tt
|������}|rtd|z���dS)z�Continue hashing of a message by consuming the next chunk of data.

        Args:
            data (byte string/byte array/memoryview): The next chunk of the message being hashed.
        rN)r�
md2_updaterrrr
�lenr)rrrs   rrzMD2Hash.updateVst���(�(�����):�):�)4�T�):�):�)1�#�d�)�)�)<�)<�>�>���	'��?�%�&�'�'�
'�	'�	'rc���t|j��}t�|j���|��}|rt
d|z���t|��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
        r)r�digest_sizer�
md2_digestrrrr	)r�bfrrs   r�digestzMD2Hash.digestdso��#�4�#3�4�4���(�(�����):�):�),�.�.���	'��?�%�&�'�'�
'��c�"�"�"rc�d�d�d�|���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%02xr)�.0�xs  r�
<listcomp>z%MD2Hash.hexdigest.<locals>.<listcomp>}s#��@�@�@�Q���a���(�@�@�@r)�joinr')rs r�	hexdigestzMD2Hash.hexdigestus-���w�w�@�@�$�+�+�-�-�@�@�@�A�A�Arc���t��}t�|j���|j�����}|rtd|z���|S)a4Return a copy ("clone") of the hash object.

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

        :return: A hash object of the same type
        zError %d while copying MD2)r
r�md2_copyrrr)r�cloners   r�copyzMD2Hash.copysc���	�	���&�&�t�{���'8�'8�',�|�'7�'7�'9�'9�;�;���	D��9�F�B�C�C�C��rc� �t|��S�N)r
)rrs  r�newzMD2Hash.new�s���t�}�}�rr5)
�__name__�
__module__�__qualname__�__doc__r$�
block_size�oidrrr'r/r3r6�rrr
r
5s����������K��J�
�C�	�	�	�	�'�'�'�#�#�#�"B�B�B����$�����rr
Nc�D�t���|��S)aCreate a new hash object.

    :parameter data:
        Optional. The very first chunk of the message to hash.
        It is equivalent to an early call to :meth:`MD2Hash.update`.
    :type data: bytes/bytearray/memoryview

    :Return: A :class:`MD2Hash` hash object
    )r
r6)rs rr6r6�s���9�9�=�=����rr5)�Crypto.Util.py3compatr�Crypto.Util._raw_apirrrrr	r
rr�objectr
r6r$r;r=rr�<module>rBs���>'�&�&�&�&�&�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�)�(�*�	����]�]�]�]�]�f�]�]�]�@�����!���
�
�
�
r

Zerion Mini Shell 1.0