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__/SHAKE128.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)	�SHAKE128_XOFz�A SHAKE128 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.11Nc�~�t��}tj|���t	d��td����}|rt
d|z���t|���tj	��|_
d|_d|_|r|�
|��dSdS)N� �z%Error %d while instantiating SHAKE128F�)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/SHAKE128.py�__init__zSHAKE128_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 SHAKE128 state)
r�	TypeErrorr�
keccak_absorbrrr
r	�lenr)rrrs   r rzSHAKE128_XOF.updateDs�����	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 SHAKE128)rrr�keccak_squeezerrr	rrrr)r�length�bfrrs    r �readzSHAKE128_XOF.readVs���"���"�6�*�*�� �/�����0A�0A�03�08��0@�0@�07��
�0F�0F�H�H���	'��F�%�&�'�'�
'��c�"�"�"r"c�4�t|��|���S)N�r)�type)rrs  r �newzSHAKE128_XOF.newqs���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 SHAKE128 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:`SHAKE128_XOF` object
    r-)rr-s r r/r/us���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�/�.�.�.�.�.�I%�I%�I%�I%�I%�6�I%�I%�I%�X#�#�#�#�#�#r"

Zerion Mini Shell 1.0