
    nj:
                    X    d dl mZ d dlmZ ddlmZ erd dlmZmZ  G d d          Z	dS )	    )annotations)TYPE_CHECKING   )crc32c)BufferSelfc                      e Zd ZdZedd            Zedd            Zedd            Zedd            ZdddZ	ddZ
ddZddZddZdS )
CRC32CHashzQWrapper class for crc32c. Tries to conform to the interface of `hashlib` classes.returnintc                    dS )z:
        The size of the resulting hash in bytes.
            selfs    a/lsinfo/ai/hellotax_ai/data_center/backend/venv/lib/python3.11/site-packages/crc32c/_crc32hash.pydigest_sizezCRC32CHash.digest_size   	    
 q    c                    dS )zI
        The internal block size of the hash algorithm in bytes.
        r   r   r   s    r   
block_sizezCRC32CHash.block_size   r   r   strc                    dS )z2
        The canonical name of this hash,
        r   r   r   s    r   namezCRC32CHash.name   s	    
 xr   c                    | j         S )zT
        The checksum calculated so far. Not part of the hashlib interface.
        )	_checksumr   s    r   checksumzCRC32CHash.checksum#   s    
 ~r   r   datar   gil_release_modeNonec                @    t          ||          | _        || _        dS )z
        Initialise the hash object with an optional bytes-like object.
        Uses the given GIL release mode on each checksum calculation.
        r    Nr   r   _gil_release_mode)r   r   r    s      r   __init__zCRC32CHash.__init__*   s'    
  7GHHH!1r   c                H    t          || j        | j                  | _        dS )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   updatezCRC32CHash.update2   s*      $.43I
 
 
r   bytesc                8    | j                             dd          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   digestzCRC32CHash.digest<   s    
 ~&&q%000r   c                N    |                                                                  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-   hexr   s    r   	hexdigestzCRC32CHash.hexdigestC   s     {{}}  """r   r   c                d     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.
        )typer   r%   )r   ress     r   copyzCRC32CHash.copyK   s.    
 d4jjll $ 6
r   N)r   r   )r   r   )r   r   )r   r   r    r   r   r!   )r   r   r   r!   )r   r)   )r   r   )__name__
__module____qualname____doc__propertyr   r   r   r   r&   r(   r-   r0   r4   r   r   r   r
   r
      s       [[   X    X    X    X2 2 2 2 2
 
 
 
1 1 1 1# # # #     r   r
   N)

__future__r   typingr   _crc32cr   typing_extensionsr   r   r
   r   r   r   <module>r>      s    " " " " " "                   /........H H H H H H H H H Hr   