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__/SHAKE256.cpython-311.pyc

�

f��f���j�ddlmZddlmZmZmZmZmZmZm	Z	m
Z
ddlmZGd�de
��Zdd�ZdS)	�)�bord)�load_pycryptodome_raw_lib�VoidPointer�SmartPointer�create_string_buffer�get_raw_buffer�c_size_t�c_uint8_ptr�c_ubyte)�_raw_keccak_libc�2�eZdZdZdZdd�Zd�Zd�Zdd�ZdS)	�SHAKE256_XOFz�A SHAKE256 hash object.
    Do not instantiate directly.
    Use the :func:`new` function.

    :ivar oid: ASN.1 Object ID
    :vartype oid: string
    z2.16.840.1.101.3.4.2.12Nc�~�t��}tj|���t	d��td����}|rt
d|z���t|���tj	��|_
d|_d|_|r|�
|��dSdS)N�@�z%Error %d while instantiating SHAKE256F�)rr�keccak_init�
address_ofr	r�
ValueErrorr�get�keccak_destroy�_state�
_is_squeezing�_padding�update)�self�data�state�results    �v/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib64/python3.11/site-packages/Crypto/Hash/SHAKE256.py�__init__zSHAKE256_XOF.__init__5s����
�
�� �,�U�-=�-=�-?�-?�-5�b�\�\�-4�R�[�[�:�:���	'��D�%�&�'�'�
'�"�5�9�9�;�;�#2�#A�C�C���"�����
��	��K�K�������	�	�c	��|jrtd���tj|j���t
|��tt|������}|rtd|z���|S)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/You cannot call 'update' after the first 'read'z&Error %d while updating SHAKE256 state)
r�	TypeErrorr�
keccak_absorbrrr
r	�lenr)rrrs   r rzSHAKE256_XOF.updateEs�����	O��M�N�N�N� �.�t�{���/@�/@�/:�4�/@�/@�/7��D�	�	�/B�/B�D�D���	'��E�%�&�'�'�
'��r"c��d|_t|��}tj|j���|t
|��t|j����}|rtd|z���t|��S)ah
        Compute the next piece of XOF output.

        .. note::
            You cannot use :meth:`update` anymore after the first call to
            :meth:`read`.

        Args:
            length (integer): the amount of bytes this method must return

        :return: the next piece of XOF output (of the given length)
        :rtype: byte string
        Tz'Error %d while extracting from SHAKE256)rrr�keccak_squeezerrr	rrrr)r�length�bfrrs    r �readzSHAKE256_XOF.readWs���"���"�6�*�*�� �/�����0A�0A�03�08��0@�0@�07��
�0F�0F�H�H���	'��F�%�&�'�'�
'��c�"�"�"r"c�4�t|��|���S)N�r)�type)rrs  r �newzSHAKE256_XOF.newrs���t�D�z�z�t�$�$�$�$r"�N)	�__name__�
__module__�__qualname__�__doc__�oidr!rr+r/�r"r rr)sk��������$�C����� ���$#�#�#�6%�%�%�%�%�%r"rNc�"�t|���S)aReturn a fresh instance of a SHAKE256 object.

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

    :Return: A :class:`SHAKE256_XOF` object
    r-)rr-s r r/r/vs���T�"�"�"�"r"r0)�Crypto.Util.py3compatr�Crypto.Util._raw_apirrrrrr	r
r�Crypto.Hash.keccakr�objectrr/r6r"r �<module>r<s���>'�&�&�&�&�&�8�8�8�8�8�8�8�8�8�8�8�8�8�8�8�8�8�8�8�8�/�.�.�.�.�.�J%�J%�J%�J%�J%�6�J%�J%�J%�Z#�#�#�#�#�#r"

Zerion Mini Shell 1.0