Your IP : 216.73.216.52


Current Path : /snap/lxd/current/lib/python3/dist-packages/crc32c/__pycache__/
Upload File :
Current File : //snap/lxd/current/lib/python3/dist-packages/crc32c/__pycache__/_crc32hash.cpython-312.pyc

�

4B�i:
��P�ddlmZddlmZddlmZerddlmZmZGd�d�Z	y)	�)�annotations)�
TYPE_CHECKING�)�crc32c)�Buffer�Selfc��eZdZdZedd��Zedd��Zed
d��Zedd��Zddd�Z	dd�Z
dd�Zd
d	�Zdd
�Z
y)�
CRC32CHashzQWrapper class for crc32c. Tries to conform to the interface of `hashlib` classes.c��y)z:
        The size of the resulting hash in bytes.
        ����selfs �S/build/lxd/parts/uefivars/install/lib/python3.12/site-packages/crc32c/_crc32hash.py�digest_sizezCRC32CHash.digest_size���
�c��y)zI
        The internal block size of the hash algorithm in bytes.
        rr
rs r�
block_sizezCRC32CHash.block_sizerrc��y)z2
        The canonical name of this hash,
        rr
rs r�namezCRC32CHash.names��
rc��|jS)zT
        The checksum calculated so far. Not part of the hashlib interface.
        )�	_checksumrs r�checksumzCRC32CHash.checksum#s��
�~�~�rc�6�t||��|_||_y)z�
        Initialise the hash object with an optional bytes-like object.
        Uses the given GIL release mode on each checksum calculation.
        ��gil_release_modeN�rr�_gil_release_mode)r�datars   r�__init__zCRC32CHash.__init__*s��
 ��7G�H���!1��rc�R�t||j|j��|_y)z�
        Update the hash object with the bytes-like object.
        Repeated calls are equivalent to a single call with the concatenation of all the arguments:
        m.update(a); m.update(b) is equivalent to m.update(a+b).
        rNr)rr s  r�updatezCRC32CHash.update2s!�� ��$�.�.�4�3I�3I�
��rc�:�|jjdd�S)z�
        Return the digest of the data passed to the update() method so far.
        This is a bytes object of size digest_size which may contain bytes in the whole range from 0 to 255.
        r�big)r�to_bytesrs r�digestzCRC32CHash.digest<s��
�~�~�&�&�q�%�0�0rc�>�|j�j�S)z�
        Like digest() except the digest is returned as a string object of double length,
        containing only hexadecimal digits.
        This may be used to exchange the value safely in email or other non-binary environments.
        )r'�hexrs r�	hexdigestzCRC32CHash.hexdigestCs���{�{�}� � �"�"rc�j�t|��}|j|_|j|_|S)u�
        Return a copy (“clone”) of the hash object. This can be used to efficiently compute
        the digests of data sharing a common initial substring.
        )�typerr)r�ress  r�copyzCRC32CHash.copyKs/��
�d�4�j�l������
� $� 6� 6����
rN)�return�int)r/�str)r���)r rrr0r/�None)r rr/r3)r/�bytes)r/r)�__name__�
__module__�__qualname__�__doc__�propertyrrrrr!r#r'r*r.r
rrr
r
sl��[�
����������������2�
�1�#�rr
N)
�
__future__r�typingr�_crc32cr�typing_extensionsrrr
r
rr�<module>r>s ��"� ���.�H�Hr