ok

Mini Shell

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

�

1�Dg����ddlmZddlmZmZmZmZmZmZm	Z	edd��Z
Gd�de��Zd
d�Z
ejZejZd	�ZdS)���bord)�load_pycryptodome_raw_lib�VoidPointer�SmartPointer�create_string_buffer�get_raw_buffer�c_size_t�c_uint8_ptrzCrypto.Hash._SHA384a�
                        int SHA384_init(void **shaState);
                        int SHA384_destroy(void *shaState);
                        int SHA384_update(void *hs,
                                          const uint8_t *buf,
                                          size_t len);
                        int SHA384_digest(const void *shaState,
                                          uint8_t *digest,
                                          size_t digest_size);
                        int SHA384_copy(const void *src, void *dst);

                        int SHA384_pbkdf2_hmac_assist(const void *inner,
                                            const void *outer,
                                            const uint8_t *first_digest,
                                            uint8_t *final_digest,
                                            size_t iterations,
                                            size_t digest_size);
                        c�F�eZdZdZdZdZdZdd�Zd�Zd�Z	d	�Z
d
�Zdd�ZdS)
�
SHA384Hasha�A SHA-384 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
    �0�z2.16.840.1.101.3.4.2.2Nc�6�t��}t�|�����}|rt	d|z���t|���tj��|_|r|�	|��dSdS)Nz#Error %d while instantiating SHA384)
r�_raw_sha384_lib�SHA384_init�
address_of�
ValueErrorr�get�SHA384_destroy�_state�update)�self�data�state�results    �t/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib64/python3.11/site-packages/Crypto/Hash/SHA384.py�__init__zSHA384Hash.__init__Gs����
�
�� �,�,�U�-=�-=�-?�-?�@�@���	'��B�%�&�'�'�
'�"�5�9�9�;�;�#2�#A�C�C����	��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.
        z'Error %d while hashing data with SHA384N)r�
SHA384_updaterrrr
�lenr)rrrs   rrzSHA384Hash.updateRsv��!�.�.�t�{���/@�/@�/:�4�/@�/@�/7��D�	�	�/B�/B�D�D���	'��F�%�&�'�'�
'�	'�	'rc��t|j��}t�|j���|t
|j����}|rtd|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
        z#Error %d while making SHA384 digest)	r�digest_sizer�
SHA384_digestrrr
rr	)r�bfrrs   r�digestzSHA384Hash.digest`s���#�4�#3�4�4�� �.�.�t�{���/@�/@�/2�/7��8H�/I�/I�K�K���	'��B�%�&�'�'�
'��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(SHA384Hash.hexdigest.<locals>.<listcomp>zs#��@�@�@�Q���a���(�@�@�@r)�joinr')rs r�	hexdigestzSHA384Hash.hexdigestrs-���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 SHA384)r
r�SHA384_copyrrr)r�cloners   r�copyzSHA384Hash.copy|se������ �,�,�T�[�_�_�->�->�-2�\�-=�-=�-?�-?�A�A���	G��<�v�E�F�F�F��rc� �t|��S)z#Create a fresh SHA-384 hash object.)r
)rrs  r�newzSHA384Hash.new�s���$���r�N)
�__name__�
__module__�__qualname__�__doc__r$�
block_size�oidrrr'r/r3r5�rrr
r
1s����������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:`SHA384Hash.update`.
    :type data: byte string/byte array/memoryview

    :Return: A :class:`SHA384Hash` hash object
    )r
r5)rs rr5r5�s���<�<���D�!�!�!rc�x�|dksJ�tt|����}t�|j���|j���||t
|��t
t|������}|rtd|z���t|��S)z/Compute the expensive inner loop in PBKDF-HMAC.rz+Error %d with PBKDF2-HMAC assist for SHA384)	rr"r�SHA384_pbkdf2_hmac_assistrrr
rr	)�inner�outer�first_digest�
iterationsr&rs      r�_pbkdf2_hmac_assistrE�s�����>�>�>�>�
�s�<�0�0�
1�
1�C�
�
6�
6��L�$�$�&�&��L�$�$�&�&� ���Z�(�(��S��.�.�/�/�
1�1�F��Q��F��O�P�P�P��#���rr6)�Crypto.Util.py3compatr�Crypto.Util._raw_apirrrrr	r
rr�objectr
r5r$r;rEr=rr�<module>rIs��*'�&�&�&�&�&�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�/�,�+�,A�����(` �` �` �` �` ��` �` �` �F"�"�"�"��$���
"�
�����r

Zerion Mini Shell 1.0