ó
    &ÝNj  ã                   óž  • % S SK Jr  S SKJrJr  S SKJr  \R                  " 5       r	\
\S'   \R                  " 5       r\
\S'   \R                  " 5       r\
\S'   \R                   " 5       r\
\S'   \R$                  " 5       r\
\S'   \R(                  " 5       r\
\S	'   S
\S\S\S\4S jrS\S\S\S\4S jrS
\S\S\S\4S jrS\S\S\S\4S jrg)é    )Ú
exceptions)ÚffiÚlib)ÚensureÚcrypto_secretbox_KEYBYTESÚcrypto_secretbox_NONCEBYTESÚcrypto_secretbox_ZEROBYTESÚcrypto_secretbox_BOXZEROBYTESÚcrypto_secretbox_MACBYTESÚ!crypto_secretbox_MESSAGEBYTES_MAXÚmessageÚnonceÚkeyÚreturnc                 óÊ  • [        U5      [        :w  a  [        R                  " S5      e[        U5      [        :w  a  [        R                  " S5      eS[
        -  U -   n[        R                  " S[        U5      5      n[        R                  " XC[        U5      X5      n[        US:H  S[        R                  S9  [        R                  " U[        U5      5      nU[        S $ )	úª
Encrypts and returns the message ``message`` with the secret ``key`` and
the nonce ``nonce``.

:param message: bytes
:param nonce: bytes
:param key: bytes
:rtype: bytes
úInvalid keyúInvalid nonceó    úunsigned char[]r   úEncryption failed©ÚraisingN)Úlenr   ÚexcÚ
ValueErrorr   r	   r   Únewr   Úcrypto_secretboxr   ÚCryptoErrorÚbufferr
   )r   r   r   ÚpaddedÚ
ciphertextÚress         Ú[/home/mande/repo/quber/.venv/lib/python3.13/site-packages/nacl/bindings/crypto_secretbox.pyr   r      s±   € ô ˆ3ƒxÔ,Ó,Ü�nŠn˜]Ó+Ð+ä
ˆ5ƒzÔ0Ó0Ü�nŠn˜_Ó-Ð-àÔ1Ñ1°GÑ;€FÜ—’Ð*¬C°«KÓ8€Jä
×
Ò
˜z´3°v³;ÀÓ
K€CÜ
ˆ3�!‰8Ð(´#·/±/ÒBä—’˜J¬¨F«Ó4€JØÔ3Ð4Ð5Ð5ó    r"   c                 óÊ  • [        U5      [        :w  a  [        R                  " S5      e[        U5      [        :w  a  [        R                  " S5      eS[
        -  U -   n[        R                  " S[        U5      5      n[        R                  " XC[        U5      X5      n[        US:H  S[        R                  S9  [        R                  " U[        U5      5      nU[        S $ )	ú¹
Decrypt and returns the encrypted message ``ciphertext`` with the secret
``key`` and the nonce ``nonce``.

:param ciphertext: bytes
:param nonce: bytes
:param key: bytes
:rtype: bytes
r   r   r   r   r   ú1Decryption failed. Ciphertext failed verificationr   N)r   r   r   r   r   r
   r   r   r   Úcrypto_secretbox_openr   r   r    r	   )r"   r   r   r!   Ú	plaintextr#   s         r$   r)   r)   9   s·   € ô ˆ3ƒxÔ,Ó,Ü�nŠn˜]Ó+Ð+ä
ˆ5ƒzÔ0Ó0Ü�nŠn˜_Ó-Ð-àÔ4Ñ4°zÑA€FÜ—’Ð)¬3¨v«;Ó7€Iä
×
#Ò
# I´s¸6³{ÀEÓ
O€CÜ
Øˆq‰Ø;Ü—‘òô —
’
˜9¤c¨&£kÓ2€IØÔ/Ð0Ð1Ð1r%   c                 óš  • [        U5      [        :w  a  [        R                  " S5      e[        U5      [        :w  a  [        R                  " S5      e[        U 5      n[
        U-   n[        R                  " SU5      n[        R                  " XPX1U5      n[        US:H  S[        R                  S9  [        R                  " XT5      nUSS $ )r   r   r   r   r   r   r   N)r   r   r   r   r   r   r   r   r   Úcrypto_secretbox_easyr   r   r    )r   r   r   Ú_mlenÚ_clenr"   r#   s          r$   r,   r,   Y   s¡   € ô ˆ3ƒxÔ,Ó,Ü�nŠn˜]Ó+Ð+ä
ˆ5ƒzÔ0Ó0Ü�nŠn˜_Ó-Ð-ä�‹L€EÜ%¨Ñ-€Eä—’Ð*¨EÓ2€Jä
×
#Ò
# J¸ÀsÓ
K€CÜ
ˆ3�!‰8Ð(´#·/±/ÒBä—’˜JÓ.€JØ‘aˆ=Ðr%   c                 ó  • [        U5      [        :w  a  [        R                  " S5      e[        U5      [        :w  a  [        R                  " S5      e[        U 5      n[        U[        :¬  SR                  [        5      [        R                  S9  U[        -
  n[        R                  " S[        SU5      5      n[        R                  " XPX1U5      n[        US:H  S[        R                  S9  [        R                  " XT5      nUS	S	 $ )
r'   r   r   z)Input ciphertext must be at least {} longr   r   é   r   r(   N)r   r   r   r   r   r   r   ÚformatÚ	TypeErrorr   r   Úmaxr   Úcrypto_secretbox_open_easyr   r    )r"   r   r   r.   r-   r*   r#   s          r$   r4   r4   u   sà   € ô ˆ3ƒxÔ,Ó,Ü�nŠn˜]Ó+Ð+ä
ˆ5ƒzÔ0Ó0Ü�nŠn˜_Ó-Ð-ä�
‹O€Eä
ØÔ*Ñ*Ø3×:Ñ:Ü%ó	
ô —‘òð Ô-Ñ-€Eä—’Ð)¬3¨q°%«=Ó9€Iä
×
(Ò
(Ø˜u¨Só€Cô Øˆq‰Ø;Ü—‘òô —
’
˜9Ó,€IØ‘Qˆ<Ðr%   N)Únaclr   r   Únacl._sodiumr   r   Únacl.exceptionsr   Úcrypto_secretbox_keybytesr   ÚintÚ__annotations__Úcrypto_secretbox_noncebytesr   Úcrypto_secretbox_zerobytesr	   Úcrypto_secretbox_boxzerobytesr
   Úcrypto_secretbox_macbytesr   Ú!crypto_secretbox_messagebytes_maxr   Úbytesr   r)   r,   r4   © r%   r$   Ú<module>rB      s  ðö  #ß !Ý "ð "%×!>Ò!>Ó!@Ð ˜3Ó @Ø#&×#BÒ#BÓ#DÐ ˜SÓ DØ"%×"@Ò"@Ó"BÐ ˜CÓ BØ%(×%FÒ%FÓ%HÐ ˜sÓ HØ!$×!>Ò!>Ó!@Ð ˜3Ó @à×)Ò)Ó+ð " 3ó ð
6˜eð 6¨Eð 6¸ð 6À%ô 6ð42Øð2Ø#ð2Ø*/ð2à
ô2ð@ 5ð °ð ¸Uð Àuô ð8*Øð*Ø#ð*Ø*/ð*à
õ*r%   