
    iw                     f    S SK Jr  S SKJrJrJrJrJrJrJ	r	J
r
  \" SS5      r " S S\5      rS rg)	    )bord)load_pycryptodome_raw_libVoidPointerSmartPointercreate_string_bufferget_raw_bufferc_size_tc_uint8_ptrc_ubytezCrypto.Hash._keccaka  
                        int keccak_init(void **state,
                                        size_t capacity_bytes,
                                        uint8_t rounds);
                        int keccak_destroy(void *state);
                        int keccak_absorb(void *state,
                                          const uint8_t *in,
                                          size_t len);
                        int keccak_squeeze(const void *state,
                                           uint8_t *out,
                                           size_t len,
                                           uint8_t padding);
                        int keccak_digest(void *state,
                                          uint8_t *digest,
                                          size_t len,
                                          uint8_t padding);
                        int keccak_copy(const void *src, void *dst);
                        int keccak_reset(void *state);
                        c                   6    \ rS rSrSrS rS rS rS rS r	Sr
g	)
Keccak_Hash<   zA Keccak hash object.
Do not instantiate directly.
Use the :func:`new` function.

:ivar digest_size: the size in bytes of the resulting hash
:vartype digest_size: integer
c                    X l         X0l        SU l        SU l        [	        5       n[
        R                  UR                  5       [        U R                   S-  5      [        S5      5      nU(       a  [        SU-  5      e[        UR                  5       [
        R                  5      U l        U(       a  U R                  U5        g g )NF         z#Error %d while instantiating keccak)digest_size_update_after_digest_digest_done_paddingr   _raw_keccak_libkeccak_init
address_ofr	   r   
ValueErrorr   getkeccak_destroy_stateupdate)selfdatadigest_bytesupdate_after_digeststateresults         M/var/www/html/trading/venv/lib/python3.13/site-packages/Crypto/Hash/keccak.py__init__Keccak_Hash.__init__E   s    '$7!! ,,U-=-=-?-5d6F6F6J-K-4R[: BVKLL"599;#2#A#ACKK     c           	         U R                   (       a  U R                  (       d  [        S5      e[        R	                  U R
                  R                  5       [        U5      [        [        U5      5      5      nU(       a  [        SU-  5      eU $ )zContinue 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.
z8You can only call 'digest' or 'hexdigest' on this objectzError %d while updating keccak)r   r   	TypeErrorr   keccak_absorbr   r   r
   r	   lenr   )r   r    r$   s      r%   r   Keccak_Hash.updateX   sn     T%>%>VWW ..t{{/@/:4/@/7D	/BD =FGGr(   c                 &   SU l         [        U R                  5      n[        R	                  U R
                  R                  5       U[        U R                  5      [        U R                  5      5      nU(       a  [        SU-  5      e[        U5      $ )zReturn the **binary** (non-printable) digest of the message that has been hashed so far.

:return: The hash digest, computed over the data processed so far.
         Binary form.
:rtype: byte string
TzError %d while squeezing keccak)r   r   r   r   keccak_digestr   r   r	   r   r   r   r   )r   bfrr$   s      r%   digestKeccak_Hash.digesti   sx     !"4#3#34 ..t{{/@/2/78H8H/I/6t}}/EG >GHHc""r(   c           	          SR                  U R                  5        Vs/ s H  nS[        U5      -  PM     sn5      $ s  snf )zReturn the **printable** digest of the message that has been hashed so far.

:return: The hash digest, computed over the data processed so far.
         Hexadecimal encoded.
:rtype: string
 z%02x)joinr1   r   )r   xs     r%   	hexdigestKeccak_Hash.hexdigest|   s4     ww$++-@-Qa(-@AA@s   =c                 N    SU;  a  SU;  a  U R                   US'   [        S0 UD6$ )z"Create a fresh Keccak hash object.r!   digest_bits )r   new)r   kwargss     r%   r<   Keccak_Hash.new   s/     'M,G%)%5%5F>"}V}r(   )r   r   r   r   r   N)__name__
__module____qualname____firstlineno____doc__r&   r   r1   r7   r<   __static_attributes__r;   r(   r%   r   r   <   s!    &"#&Br(   r   c                     U R                  SS5      nU R                  SS5      nU R                  SS5      nU R                  SS5      nSX44;  a  [        S5      eSX44:X  a  [        S	5      eUb  US
;  a  [        S5      eOUS;  a  [        S5      eUS-  nU (       a  [        S[        U 5      -   5      e[	        XU5      $ )a;  Create a new hash object.

Args:
    data (bytes/bytearray/memoryview):
        The very first chunk of the message to hash.
        It is equivalent to an early call to :meth:`Keccak_Hash.update`.
    digest_bytes (integer):
        The size of the digest, in bytes (28, 32, 48, 64).
    digest_bits (integer):
        The size of the digest, in bits (224, 256, 384, 512).
    update_after_digest (boolean):
        Whether :meth:`Keccak.digest` can be followed by another
        :meth:`Keccak.update` (default: ``False``).

:Return: A :class:`Keccak_Hash` hash object
r    Nr"   Fr!   r:   z*Only one digest parameter must be provided)NNz&Digest size (bits, bytes) not provided)       0   @   z('digest_bytes' must be: 28, 32, 48 or 64)      i  i   z,'digest_bytes' must be: 224, 256, 384 or 512   zUnknown parameters: )popr*   r   strr   )r=   r    r"   r!   r:   s        r%   r<   r<      s    $ ::fd#D **%:EB::nd3L**]D1KL..DEE22@AA//GHH 0 22KLL"a'.V<==t+>??r(   N)Crypto.Util.py3compatr   Crypto.Util._raw_apir   r   r   r   r   r	   r
   r   r   objectr   r<   r;   r(   r%   <module>rR      sB   > '8 8 8 ,,A*P& Pf&@r(   