+
    ^eòjë/  ã                   ó¦   € ^ RI t ^ RIt^ RIHt ^ RIHtHt ^ RIHtH	t	 ^RI
Ht ^RIHt R tR t^ tR	 tR
 t^t^t^t^t ! R R]4      tRR ltR# )é    N)Úlong_to_bytes)ÚbchrÚis_native_int)Úc_size_tÚc_uint8_ptr)ÚTurboSHAKE128)Ú_raw_keccak_libc                 ó`   € V ^ 8X  d   R# \        V 4      pV\        \        V4      4      ,           # )r   ó    )r   r   Úlen)ÚxÚSs   & Ú‘/opt/data/installs/351f81cc06284494/environments/aa258815729c481f8402f54f4c368f83/venv/lib/python3.14/site-packages/Crypto/Hash/KangarooTwelve.pyÚ_length_encoder   )   s)   € ØˆA„vÙä�aÓ€AØŒt”C˜“F‹|ÕÐó    c                ó:  € \        V 4      R,          p\        V 4      RV,          8X  g   Q h\        V4      ^ V,          8X  g   Q hV^ 8X  d   R# \        P                  ! \        V 4      \	        V4      \        V4      4      pV'       d   \        RV,          4      hR# )aZ  Compute the chaining values of complete 8192-byte leaves.

The C function does not use any shared state, so different ranges
of leaves can be processed concurrently, each one into its own
slice of a common CV buffer.

Args:
    leaves (memoryview): ``n`` leaves, ``8192 * n`` bytes
    cvs (memoryview): writeable output buffer, ``32 * n`` bytes
é    Nz!Error %d while hashing K12 leaves)r   r	   Ú
k12_leavesr   r   Ú
ValueError)ÚleavesÚcvsÚn_leavesÚresults   &&  r   Ú_hash_leavesr   1   sŠ   € ô �6‹{˜dÕ"€HÜˆv‹;˜$ �/Ô)Ð)Ð)Üˆs‹8�r˜H•}Ô$Ð$Ð$Ø�1„}Ùä×'Ò'¬°FÓ(;Ü(0°Ó(:Ü(3°CÓ(8ó:€F÷ ÜÐ<¸vÕEÓFÐFñ r   c                 ó†  € \        \        R4      '       d   \        P                  ! 4       p Mw\        \        R4      '       d!   \        \        P                  ! ^ 4      4      p MA\        \        R4      '       d   \        P
                  ! 4       p M^ RIp VP                  4       p T ;'       g    ^#   \         d    Rp  Li ; i)z7Return the number of CPU cores this process can run on.Úprocess_cpu_countÚsched_getaffinityÚ	cpu_countN)ÚhasattrÚosr   r   r   r   ÚmultiprocessingÚNotImplementedError)Úcountr!   s     r   Ú_available_coresr$   O   s•   € ô ŒrÐ&×'Ò'Ü×$Ò$Ó&‰Ü	”Ð(×	)Ò	)Ü”B×(Ò(¨Ó+Ó,‰Ü	”�[×	!Ò	!Ü—’“‰ãð	Ø#×-Ñ-Ó/ˆEð �:ˆ:�AÐøô #ô 	ØŠEð	ús   ÂB0 Â0C Â?C c                óV  a aa	€ \        S 4      R,          p\        W#\        ,          4      pV^8:  d   \        S S4       R# . o	VV	V 3R lp\	        V^,           4       Uu. uF  qSV,          V,          NK  	  pp. p\	        ^V4       FX  p\
        P                  ! WFV,          We^,           ,          3R7      pRVn        VP                  4        VP                  V4       KZ  	  V! V^ ,          V^,          4       V F  pVP                  4        K  	  S	'       d
   S	^ ,          hR# u upi )zþLike :func:`_hash_leaves`, but split the leaves into ``threads``
contiguous ranges, which are processed in parallel.
Fewer threads are used if a range would be shorter than
``_MIN_LEAVES_PER_THREAD`` leaves.
The calling thread processes the first range.
r   Nc                 óº   <€  \        SR V ,          R V,           S^ V ,          ^ V,           4       R#   \         d   pSP                  T4        Rp?R# Rp?ii ; i)r   N)r   Ú	ExceptionÚappend)ÚstartÚendÚer   Úerrorsr   s   && €€€r   ÚworkerÚ%_hash_leaves_threaded.<locals>.workerr   sR   ø€ ð	Ü˜  u¥¨T°C­ZÐ8Ø˜R %�Z¨¨S­Ð1ö3øäô 	Ø�M‰M˜!×Òûð	ús   ƒ.3 ³A¾AÁA)ÚtargetÚargsT)r   ÚminÚ_MIN_LEAVES_PER_THREADr   ÚrangeÚ	threadingÚThreadÚdaemonr)   r(   Újoin)
r   r   Úthreadsr   r-   ÚiÚboundsÚworkersÚtr,   s
   ff&      @r   Ú_hash_leaves_threadedr=   b   sý   ú€ ô �6‹{˜dÕ"€HÜ�'Ô'=Õ=Ó>€GØ�!„|Ü�V˜SÔ!Ùà€F÷ô 05°W¸qµ[Ô/AÓBÑ/A¨!˜�l˜g×%Ð%Ñ/A€FÐBà€GÜ�1�gÖˆÜ×Ò F¸µ)¸VÈÅE½]Ð1KÔLˆØˆŒØ	�‰Œ	Ø�‰�qÖñ	 ñ ˆ6�!�9�f˜Q•iÔ ãˆØ	�‰Žñ ÷ Ø�Q�iˆñ ùò Cs   ÁD&c                   óJ   a € ] tR t^“t o RtR	R ltR tR tR tR
R lt	Rt
V tR# )ÚK12_XOFzYA KangarooTwelve hash object.
Do not instantiate directly.
Use the :func:`new` function.
c                óØ  € VR 8X  d   Rp\        V4      '       d   \        V\        4      '       d   \        R4      hV^ 8  d   \	        R4      hV^ 8X  d   \        4       pW0n        V\        \        V4      4      ,           V n	        \        V n        R V n        \        P                  ! ^R7      V n        ^ V n        R V n        ^ V n        ^ V n        V'       d   V P)                  V4       R # R # )Nr   z'threads' must be an integerz('threads' must be a non-negative integer©Údomain)r   Ú
isinstanceÚboolÚ	TypeErrorr   r$   Ú_threadsr   r   Ú_customÚ	SHORT_MSGÚ_stateÚ_paddingr   ÚnewÚ_hash1Ú_length1Ú_hash2Ú_length2Ú_ctrÚupdate©ÚselfÚdataÚcustomr8   s   &&&&r   Ú__init__ÚK12_XOF.__init__™   sÃ   € à�TŒ>ØˆFä˜W×%Ò%¬°G¼T×)BÒ)BÜÐ:Ó;Ð;Ø�QŒ;ÜÐGÓHÐHØ�aŒ<Ü&Ó(ˆGØŒà¤¬s°6«{Ó ;Õ;ˆŒÜˆŒØˆŒô $×'Ò'¨qÔ1ˆŒØˆŒð ˆŒØˆŒð ˆŒ	çØ�K‰K˜Öñ r   c                ó€  € V P                   \        8X  d   \        R4      hV P                   \        8X  dl   V P                  \        V4      ,           pV\        V P                  4      ,           R8:  d$   W n        V P                  P                  V4       V # \        V n         V P                   \        8X  Ed    \        V4      pV P                  R8  g   Q h\        \        V4      RV P                  ,
          4      pV P                  P                  VRV 4       V ;P                  V,          un        V P                  R8  d   V # V P                  R8X  g   Q hRpV P                  P                  V4       V ;P                  ^,          un        \        P                  ! ^R7      V n        ^ V n        ^V n        \"        V n         V P                  W4R 4      # V P                   \"        8X  g   Q h^ p\        V4      p\        V4      pWg8  Ed3   V P                  ^ 8X  d!   Wv,
          R8¼  d   V P%                  W64      pK8  \        VR,           V P                  ,
          V4      pV P                  P                  W6V 4       V ;P                  W†,
          ,          un        TpV P                  R8X  g   K­  V P                  P'                  ^ 4      p	V P                  P                  V	4       V ;P                  ^ ,          un        V P                  P)                  4        ^ V n        V ;P                   ^,          un        EK9  V # )zÚHash the next piece of data.

.. note::
    For better performance, submit chunks with a length multiple of 8192 bytes.

Args:
    data (byte string/byte array/memoryview): The next chunk of the
      message to hash.
z/You cannot call 'update' after the first 'read'r   NrA   s          )rI   Ú	SQUEEZINGrE   rH   rM   r   rG   rL   rQ   ÚLONG_MSG_S0Ú
memoryviewr1   r   rK   rN   rO   rP   ÚLONG_MSG_SXÚ_update_full_leavesÚreadÚ_reset)
rS   rT   Únext_lengthÚdata_memÚdtcÚdividerÚindexÚlen_dataÚ	new_indexÚcv_is
   &&        r   rQ   ÚK12_XOF.update¹   sn  € ð �;‰;œ)Ô#ÜÐMÓNÐNà�;‰;œ)Ô#ØŸ-™-¬#¨d«)Õ3ˆKàœS §¡Ó.Õ.°$Ô6Ø +”Ø—‘×"Ñ" 4Ô(Ø�ô &ˆDŒKà�;‰;œ+Õ%Ü! $Ó'ˆHØ—=‘= 4Ô'Ð(Ð'Ü”c˜$“i ¨¯©Õ!5Ó6ˆCØ�K‰K×Ñ˜x¨¨˜~Ô.Ø�MŠM˜SÕ �Mà�}‰}˜tÔ#Ø�ð —=‘= DÔ(Ð)Ð(à+ˆGØ�K‰K×Ñ˜wÔ'Ø�MŠM˜QÕ�Mä'×+Ò+°4Ô8ˆDŒKØˆDŒMØˆDŒIä%ˆDŒKØ—;‘;˜x¨˜~Ó.Ð.ð �{‰{œkÔ)Ð*Ð)ØˆÜ�t“9ˆô ˜dÓ#ˆØÕà�}‰} Ô! hÕ&6¸$Ô&>Ø×0Ñ0°ÓA�Ùä˜E D�L¨4¯=©=Õ8¸(ÓCˆIØ�K‰K×Ñ˜x¨iÐ8Ô9Ø�MŠM˜YÕ.Õ.�MØˆEà�}‰} Ö$Ø—{‘{×'Ñ'¨Ó+�Ø—‘×"Ñ" 4Ô(Ø—’ Õ#•Ø—‘×"Ñ"Ô$Ø !�”Ø—	’	˜Q•—	�	àˆr   c                óà  € V P                   ^ 8X  g   Q h\        V4      V,
          R,          pVRV,          ,           p\        ^ V,          4      pV P                  ^8”  d$   \	        WV \        V4      V P                  4       M\        WV \        V4      4       V P                  P                  V4       V ;P                  ^ V,          ,          un	        V ;P                  V,          un
        V# )a  Hash as many complete 8192-byte leaves as available,
starting at offset ``index`` of ``data_mem``.

This is the hot path for long messages: all leaves are hashed
with a single call to the raw Keccak library.

:return: the offset of the first byte not consumed
r   )rO   r   Ú	bytearrayrF   r=   r[   r   rL   rQ   rM   rP   )rS   ra   rd   r   r*   r   s   &&&   r   r]   ÚK12_XOF._update_full_leaves  s¹   € ð �}‰} Ô!Ð!Ð!ä˜“M EÕ)¨dÕ2ˆØ�d˜X•oÕ%ˆä˜˜X�Ó&ˆØ�=‰=˜1ÔÜ! (°Ð"5´zÀ#³Ø"&§-¡-õ1ô ˜¨Ð,¬j¸«oÔ>Ø�‰×Ñ˜3Ôà�Š˜˜h�Õ&�Ø�	Š	�XÕ�	Øˆ
r   c                óx  € RpV P                   \        8X  d7   V P                  \        V P                  4      ,           R8”  d   \
        V n         V P                   \        8X  d8   V P                  P                  V P                  4       ^V n        \        V n         V P                   \
        8X  d5   V P                  V P                  4       RpV P                   \        8X  g   Q hV P                   \        8X  Ed   V'       g   V P                  V P                  4       V P                  ^ 8”  dŠ   V P                  P                  ^ 4      pV P                  P                  V4       V ;P                  ^ ,          un        V P                  P                  4        ^ V n        V ;P                  ^,          un        \!        V P                  ^,
          4      R,           pV P                  P                  V4       ^V n        \        V n         V P                  V P                  n        V P                  P                  V4      # )a  
Produce more bytes of the digest.

.. note::
    You cannot use :meth:`update` anymore after the first call to
    :meth:`read`.

Args:
    length (integer): the amount of bytes this method must return

:return: the next piece of XOF output (of the given length)
:rtype: byte string
Fr   Ts   ÿÿ)rI   rH   rM   r   rG   rZ   rL   rQ   rJ   rY   r\   rO   rN   r^   r_   rP   r   Ú_domain)rS   ÚlengthÚcustom_was_consumedrg   Útrailers   &&   r   r^   ÚK12_XOF.read!  s~  € ð $Ðð �;‰;œ)Ô#Ø—‘¤ D§L¡LÓ 1Õ1°DÔ8Ü%ˆDŒKà�;‰;œ)Ô#Ø�K‰K×Ñ˜tŸ|™|Ô,Ø ˆDŒMÜ#ˆDŒKà�;‰;œ+Ô%Ø�K‰K˜Ÿ™Ô%Ø"&ÐØ—;‘;¤+Ô-Ð.Ð-à�;‰;œ+Õ%ß&Ø—‘˜DŸL™LÔ)ð �}‰}˜qÔ Ø—{‘{×'Ñ'¨Ó+�Ø—‘×"Ñ" 4Ô(Ø—’ Õ#•Ø—‘×"Ñ"Ô$Ø !�”Ø—	’	˜Q••	ä$ T§Y¡Y°¥]Ó3°kÕAˆGØ�K‰K×Ñ˜wÔ'à ˆDŒMÜ#ˆDŒKà"Ÿm™mˆ�‰ÔØ�{‰{×Ñ Ó'Ð'r   Nc                ó&   € \        V 4      ! WV4      # )N)ÚtyperR   s   &&&&r   rK   ÚK12_XOF.newX  s   € Ü�DŒz˜$¨Ó0Ð0r   )	rP   rG   rL   rN   rM   rO   rJ   rI   rF   )é   )Nr   ru   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__rV   rQ   r]   r^   rK   Ú__static_attributes__Ú__classdictcell__)Ú__classdict__s   @r   r?   r?   “   s,   ø‡ € ñô
ò@KòZò65(÷n1ò 1r   r?   c                ó   € \        WV4      # )a7  Return a fresh instance of a KangarooTwelve object.

Args:
   data (bytes/bytearray/memoryview):
    Optional.
    The very first chunk of the message to hash.
    It is equivalent to an early call to :meth:`update`.
   custom (bytes):
    Optional.
    A customization byte string.
   threads (integer):
    Optional.
    The maximum number of threads used to hash long messages
    (default: 1, no extra threads).
    Use 0 for as many threads as the CPU cores available
    to this process.
    Each thread hashes at least 256 KiB of a single call to
    :meth:`K12_XOF.update` (or of ``data``): with shorter
    inputs, fewer threads are used, or none at all.
    For best results, do not exceed the number of physical cores.
    The output does not depend on the number of threads.

:Return: A :class:`K12_XOF` object
)r?   )rT   rU   r8   s   &&&r   rK   rK   \  s   € ô4 �4 Ó)Ð)r   )NNru   )r    r4   ÚCrypto.Util.numberr   ÚCrypto.Util.py3compatr   r   ÚCrypto.Util._raw_apir   r   Ú r   Úkeccakr	   r   r   r2   r$   r=   rH   rZ   r\   rY   Úobjectr?   rK   © r   r   Ú<module>r†      sd   ðó> 
Û å ,ß 5ß 6å Ý #òòGð6 Ð òò&'ðV €	Ø€Ø€Ø€	ôF1ˆfô F1öR*r   