
    i                     P    S SK JrJrJr  SSKJr  SSKJrJr   " S S\5      r	S r
g)	    )bordis_bytestobytes   )	cSHAKE128)_encode_str_right_encodec                   6    \ rS rSrSrS rS rS rS rS r	Sr
g	)
	TupleHash%   zPA Tuple hash object.
Do not instantiate directly.
Use the :func:`new` function.
c                 N    X0l         UR                  SUS5      U l        S U l        g )N    s	   TupleHash)digest_size_new_cshake_digest)selfcustomcshaker   s       S/var/www/html/trading/venv/lib/python3.13/site-packages/Crypto/Hash/TupleHash128.py__init__TupleHash.__init__+   s#    &{{3=r   c                     U R                   b  [        S5      eU HB  n[        U5      (       d  [        S5      eU R                  R	                  [        U5      5        MD     U $ )zAuthenticate the next tuple of byte strings.
TupleHash guarantees the logical separation between each byte string.

Args:
    data (bytes/bytearray/memoryview): One or more items to hash.
z6You cannot call 'update' after 'digest' or 'hexdigest'z#You can only call 'update' on bytes)r   	TypeErrorr   r   updater   )r   dataitems      r   r   TupleHash.update2   sW     <<#TUUDD>> EGGLLD 12 
 r   c                     U R                   c[  U R                  R                  [        U R                  S-  5      5        U R                  R                  U R                  5      U l         U R                   $ )zReturn the **binary** (non-printable) digest of the tuple of byte strings.

:return: The hash digest. Binary form.
:rtype: byte string
   )r   r   r   r	   r   read)r   s    r   digestTupleHash.digestD   sV     <<LLd.>.>.B CD<<,,T-=-=>DL||r   c           	          SR                  [        U R                  5       5       Vs/ s H  nS[        U5      -  PM     sn5      $ s  snf )z}Return the **printable** digest of the tuple of byte strings.

:return: The hash digest. Hexadecimal encoded.
:rtype: string
 z%02x)jointupler"   r   )r   xs     r   	hexdigestTupleHash.hexdigestQ   s;     ww%2FG2FQa(2FGHHGs   Ac                 N    SU;  a  SU;  a  U R                   US'   [        S0 UD6$ )z>Return a new instance of a TupleHash object.
See :func:`new`.
digest_bytesdigest_bits )r   new)r   kwargss     r   r/   TupleHash.newZ   s/    
 'M,G%)%5%5F>"}V}r   )r   r   r   N)__name__
__module____qualname____firstlineno____doc__r   r   r"   r)   r/   __static_attributes__r.   r   r   r   r   %   s!    
$Ir   r   c                  0   U R                  SS5      nU R                  SS5      nSX4;  a  [        S5      eSX4:X  a  SnUb  US:  a  [        S5      eO US:  d
  US-  (       a  [        S	5      eUS-  nU R                  S
S5      n[        U[        U5      $ )a  Create a new TupleHash128 object.

Args:
   digest_bytes (integer):
    Optional. The size of the digest, in bytes.
    Default is 64. Minimum is 8.
   digest_bits (integer):
    Optional and alternative to ``digest_bytes``.
    The size of the digest, in bits (and in steps of 8).
    Default is 512. Minimum is 64.
   custom (bytes):
    Optional.
    A customization bytestring (``S`` in SP 800-185).

:Return: A :class:`TupleHash` object
r,   Nr-   z*Only one digest parameter must be provided)NN@   r    z!'digest_bytes' must be at least 8z0'digest_bytes' must be at least 64 in steps of 8r   r   )popr   
ValueErrorr   r   )r0   r,   r-   r   s       r   r/   r/   e   s    $ ::nd3L**]D1KL..DEE22!@AA  {Q - . ."a'ZZ#&FVY55r   N)Crypto.Util.py3compatr   r   r   r%   r   r   r	   objectr   r/   r.   r   r   <module>r>      s%   > : 9  1= =@#6r   