+
    ^eòjW*  ã                   óŒ   € ^ RI Ht ^ RIHt ^ RIHtHtHtHtH	t	H
t
HtHtHt ]! RR4      tR t ! R R]4      tR	 tR
 t^t^ tR# )é    )Úget_random_bytes)Ú_copy_bytes)	Úload_pycryptodome_raw_libÚcreate_string_bufferÚget_raw_bufferÚVoidPointerÚSmartPointerÚc_size_tÚc_uint8_ptrÚc_ulongÚis_writeable_bufferzCrypto.Cipher._chacha20aè  
                    int chacha20_init(void **pState,
                                      const uint8_t *key,
                                      size_t keySize,
                                      const uint8_t *nonce,
                                      size_t nonceSize);

                    int chacha20_destroy(void *state);

                    int chacha20_encrypt(void *state,
                                         const uint8_t in[],
                                         uint8_t out[],
                                         size_t len);

                    int chacha20_seek(void *state,
                                      unsigned long block_high,
                                      unsigned long block_low,
                                      unsigned offset);

                    int hchacha20(  const uint8_t key[32],
                                    const uint8_t nonce16[16],
                                    uint8_t subkey[32]);
                    c                 óü   € \        V 4      ^ 8X  g   Q h\        V4      ^8X  g   Q h\        ^ 4      p\        P                  \	        V 4      \	        V4      \	        V4      4      pV'       d   \        RV,          4      hV# )é    z,Error %d when deriving subkey with HChaCha20)ÚlenÚ	bytearrayÚ_raw_chacha20_libÚ	hchacha20r   Ú
ValueError)ÚkeyÚnonceÚsubkeyÚresults   &&  Ú�/opt/data/installs/351f81cc06284494/environments/aa258815729c481f8402f54f4c368f83/venv/lib/python3.14/site-packages/Crypto/Cipher/ChaCha20.pyÚ
_HChaCha20r   C   sp   € äˆs‹8�rŒ>Ðˆ>Üˆu‹:˜ÔÐÐä�r‹]€FÜ×(Ñ(Ü˜CÓ Ü˜EÓ"Ü˜FÓ#ó%€F÷ ÜÐGÈ&ÕPÓQÐQà€Mó    c                   óN   a € ] tR t^St o Rt^tR tR	R ltR tR	R lt	R t
RtV tR# )
ÚChaCha20Cipherz©ChaCha20 (or XChaCha20) cipher object.
Do not create it directly. Use :py:func:`new` instead.

:var nonce: The nonce with length 8, 12 or 24 bytes
:vartype nonce: bytes
c                óf  € \        RRV4      V n        \        V4      ^8X  d+   \        WR,          4      pRVR,          ,           pRV n        MRV n        V P                  pRV n        \        4       V n        \        P                  V P                  P                  4       \        V4      \        \        V4      4      V\        \        V4      4      4      pV'       d   \        RVV P                  3,          4      h\        V P                  P                  4       \        P                   4      V n        R# )	zTInitialize a ChaCha20/XChaCha20 cipher object

See also `new()` at the module level.NºNé   Nºr    NNÚ	XChaCha20ÚChaCha20z"Error %d instantiating a %s cipheró       )ÚencryptÚdecrypt)r   r   r   r   Ú_nameÚ_nextr   Ú_stater   Úchacha20_initÚ
address_ofr   r
   r   r	   ÚgetÚchacha20_destroy)Úselfr   r   r   s   &&& r   Ú__init__ÚChaCha20Cipher.__init__]   sø   € ô
 !  t¨UÓ3ˆŒ
ô ˆu‹:˜ÔÜ˜S¨¥*Ó-ˆCØ %¨¥*Õ,ˆEØ$ˆD�Jà#ˆDŒJØ—J‘JˆEà+ˆŒ
ä!“mˆŒÜ"×0Ñ0ØŸ™×.Ñ.Ó0Ü# CÓ(Ü ¤ S£Ó*ØÜ ¤ U£Ó,ó.ˆ÷ ÜÐAÀVØEIÇZÁZðEQõ Qó Rð Rä" 4§;¡;§?¡?Ó#4Ü#4×#EÑ#EóGˆŽr   Nc                ój   € RV P                   9  d   \        R4      hRV n         V P                  W4      # )ac  Encrypt a piece of data.

Args:
  plaintext(bytes/bytearray/memoryview): The data to encrypt, of any size.
Keyword Args:
  output(bytes/bytearray/memoryview): The location where the ciphertext
    is written to. If ``None``, the ciphertext is returned.
Returns:
  If ``output`` is ``None``, the ciphertext is returned as ``bytes``.
  Otherwise, ``None``.
r%   z-Cipher object can only be used for decryption)r%   )r(   Ú	TypeErrorÚ_encrypt)r.   Ú	plaintextÚoutputs   &&&r   r%   ÚChaCha20Cipher.encrypt}   s2   € ð ˜DŸJ™JÔ&ÜÐKÓLÐLØ!ˆŒ
Ø�}‰}˜YÓ/Ð/r   c           
     óì  € Vf   \        \        V4      4      pMRTp\        V4      '       g   \        R4      h\        V4      \        V4      8w  d   \	        R\        V4      ,          4      h\
        P                  V P                  P                  4       \        V4      \        V4      \        \        V4      4      4      pV'       d   \	        RW@P                  3,          4      hVf   \        V4      # R# )zEncrypt without FSM checksNz4output must be a bytearray or a writeable memoryviewz9output must have the same length as the input  (%d bytes)z!Error %d while encrypting with %s)r   r   r   r2   r   r   Úchacha20_encryptr)   r,   r   r
   r'   r   )r.   r4   r5   Ú
ciphertextr   s   &&&  r   r3   ÚChaCha20Cipher._encrypt�   sÑ   € ð Š>Ü-¬c°)«nÓ=‰JàˆJä& v×.Ò.ÜÐ VÓWÐWä�9‹~¤ V£Ô,Ü ð "0Ü25°i³.õ"Aó Bð Bô #×3Ñ3Ø)-¯©¯©Ó):Ü)4°YÓ)?Ü)4°ZÓ)@Ü)1´#°i³.Ó)Aó	Cˆ÷
 ÜÐ@ÀFÏJÉJÐCWÕWÓXÐXàŠ>Ü! *Ó-Ð-ár   c                óÚ   € RV P                   9  d   \        R4      hRV n          V P                  W4      #   \         d*   p\        \	        T4      P                  RR4      4      hRp?ii ; i)aa  Decrypt a piece of data.

Args:
  ciphertext(bytes/bytearray/memoryview): The data to decrypt, of any size.
Keyword Args:
  output(bytes/bytearray/memoryview): The location where the plaintext
    is written to. If ``None``, the plaintext is returned.
Returns:
  If ``output`` is ``None``, the plaintext is returned as ``bytes``.
  Otherwise, ``None``.
r&   z-Cipher object can only be used for encryptionÚencÚdecN)r&   )r(   r2   r3   r   ÚstrÚreplace)r.   r9   r5   Úes   &&& r   r&   ÚChaCha20Cipher.decrypt«   sa   € ð ˜DŸJ™JÔ&ÜÐKÓLÐLØ!ˆŒ
ð	;Ø—=‘= Ó4Ð4øÜô 	;ÜœS ›VŸ^™^¨E°5Ó9Ó:Ð:ûð	;ús   ¥6 ¶A*Á$A%Á%A*c                ó  € \        V^@4      w  r#VR,          pV^ ,	          p\        P                  V P                  P	                  4       \        V4      \        V4      V4      pV'       d   \        RW`P                  3,          4      hR# )zÐSeek to a certain position in the key stream.

If you want to seek to a certain block,
use ``seek(block_number * 64)``.

Args:
  position (integer):
    The absolute position within the key stream, in bytes.
l   ÿÿ zError %d while seeking with %sN)Údivmodr   Úchacha20_seekr)   r,   r   r   r'   )r.   ÚpositionÚblock_numberÚoffsetÚ	block_lowÚ
block_highr   s   &&     r   ÚseekÚChaCha20Cipher.seekÁ   sz   € ô  & h°Ó3ÑˆØ  :Õ-ˆ	Ø! RÕ'ˆ
ä"×0Ñ0Ø15·±·±Ó1BÜ18¸Ó1DÜ18¸Ó1CØ17ó	3ˆ÷ ÜÐ=ÀÏÉÐ@TÕTÓUÐUñ r   )r'   r(   r)   r   )N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú
block_sizer/   r%   r3   r&   rJ   Ú__static_attributes__Ú__classdictcell__)Ú__classdict__s   @r   r   r   S   s3   ø‡ € ñð €JòGô@0ò$ô8;÷,Vð Vr   r   c                ó&  € \        V 4      ^ 8w  d   \        R4      hVf   \        ^4      ;r!M8\        V4      ^8X  d   RV,           pM\        V4      ^8X  d   TpM\        R4      h\        WR7      P	                  R4      pVR,          VR,          V3# )zjDerive a tuple (r, s, nonce) for a Poly1305 MAC.

If nonce is ``None``, a new 12-byte nonce is generated.
z-Poly1305 with ChaCha20 requires a 32-byte keyr$   z6Poly1305 with ChaCha20 requires an 8- or 12-byte nonce)r   r   r   r!   s                                    )r   r   r   Únewr%   )r   r   Úpadded_nonceÚrss   &&  r   Ú_derive_Poly1305_key_pairrY   Ú   s�   € ô ˆ3ƒx�2„~ÜÐHÓIÐIà‚}Ü/°Ó3Ð3ˆ�uÜ	ˆU‹�qŒð +¨UÕ2‰Ü	ˆU‹�rÔ	Ø‰äÐQÓRÐRä	�Ô	)×	1Ñ	1°,Ó	?€BØˆc�7�B�s•G˜UÐ"Ð"r   c                 óz  €  V P                  R4      pT P                  RR4      pTf   \        ^4      p\	        T4      ^ 8w  d   \        R4      h\	        T4      R9  d   \        R4      hT '       d   \        R\        T 4      ,           4      h\        Y4      #   \         d   p\        RT,          4      hRp?ii ; i)	aM  Create a new ChaCha20 or XChaCha20 cipher

Keyword Args:
    key (bytes/bytearray/memoryview): The secret key to use.
        It must be 32 bytes long.
    nonce (bytes/bytearray/memoryview): A mandatory value that
        must never be reused for any other encryption
        done with this key.

        For ChaCha20, it must be 8 or 12 bytes long.

        For XChaCha20, it must be 24 bytes long.

        If not provided, 8 bytes will be randomly generated
        (you can find them back in the ``nonce`` attribute).

:Return: a :class:`Crypto.Cipher.ChaCha20.ChaCha20Cipher` object
r   zMissing parameter %sNr   z,ChaCha20/XChaCha20 key must be 32 bytes longz:Nonce must be 8/12 bytes(ChaCha20) or 24 bytes (XChaCha20)zUnknown parameters: )é   é   é   )ÚpopÚKeyErrorr2   r   r   r   r>   r   )Úkwargsr   r@   r   s   ,   r   rV   rV   ÷   s«   € ð(4Ø�j‰j˜Óˆð �J‰J�w Ó%€EØ‚}Ü  Ó#ˆä
ˆ3ƒx�2„~ÜÐGÓHÐHä
ˆ5ƒz˜Ô$ÜÐUÓVÐVçÜÐ.´°V³Õ<Ó=Ð=ä˜#Ó%Ð%øô! ô 4ÜÐ.°Õ2Ó3Ð3ûð4ús   ‚B ÂB:Â#B5Â5B:N)ÚCrypto.Randomr   ÚCrypto.Util.py3compatr   ÚCrypto.Util._raw_apir   r   r   r   r	   r
   r   r   r   r   r   Úobjectr   rY   rV   rQ   Úkey_size© r   r   Ú<module>rg      s`   ðõ> +å -÷7÷ 7õ 7ñ .Ð.GðóÐ ò4ô DV�Vô DVòN#ò:&&ðR €
ð ‚r   