| Current Path : /snap/lxd/current/lib/python3/dist-packages/crc32c/__pycache__/ |
| Current File : //snap/lxd/current/lib/python3/dist-packages/crc32c/__pycache__/_crc32hash.cpython-312.pyc |
�
4B�i:
� �P � d dl mZ d dlmZ ddlmZ erd dlmZmZ G d� d� Z y) � )�annotations)�
TYPE_CHECKING� )�crc32c)�Buffer�Selfc � � e Zd ZdZedd�� Zedd�� Zed
d�� Zedd�� Zddd�Z dd�Z
dd�Zd
d �Zdd
�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.
r r
r s r �
block_sizezCRC32CHash.block_size r r c � � y)z2
The canonical name of this hash,
r r
r s r �namezCRC32CHash.name s � �
r c � � | j S )zT
The checksum calculated so far. Not part of the hashlib interface.
)� _checksumr s r �checksumzCRC32CHash.checksum# s � �
�~�~�r c �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�r r �_gil_release_mode)r �datar s r �__init__zCRC32CHash.__init__* s � �
��7G�H���!1��r c �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).
r Nr )r r s r �updatezCRC32CHash.update2 s! � � ��$�.�.�4�3I�3I�
��r c �: � | j j dd� 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_bytesr s r �digestzCRC32CHash.digest<