https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/nacl/bindings/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/nacl/bindings/__pycache__/crypto_aead.cpython-310.pyc
o

��a�<�
@sUddlmZddlmZddlmZmZddlm	Z		e�
�Zee
d<e��Zee
d<e��Zee
d<e��Zee
d<e��Zee
d	<eeZe��Zee
d
<e��Zee
d<e��Zee
d<e��Zee
d
<e��Z ee
d<e eZ!e�"�Z#ee
d<e�$�Z%ee
d<e�&�Z'ee
d<e�(�Z)ee
d<e�*�Z+ee
d<e+e)Z,de-dee-de-de-de-f
dd�Z.de-dee-de-de-de-f
dd�Z/de-dee-de-de-de-f
dd�Z0de-dee-de-de-de-f
d d!�Z1de-dee-de-de-de-f
d"d#�Z2de-dee-de-de-de-f
d$d%�Z3d&S)'�)�Optional)�
exceptions)�ffi�lib)�ensure�*crypto_aead_chacha20poly1305_ietf_KEYBYTES�+crypto_aead_chacha20poly1305_ietf_NSECBYTES�+crypto_aead_chacha20poly1305_ietf_NPUBBYTES�(crypto_aead_chacha20poly1305_ietf_ABYTES�2crypto_aead_chacha20poly1305_ietf_MESSAGEBYTES_MAX�%crypto_aead_chacha20poly1305_KEYBYTES�&crypto_aead_chacha20poly1305_NSECBYTES�&crypto_aead_chacha20poly1305_NPUBBYTES�#crypto_aead_chacha20poly1305_ABYTES�-crypto_aead_chacha20poly1305_MESSAGEBYTES_MAX�+crypto_aead_xchacha20poly1305_ietf_KEYBYTES�,crypto_aead_xchacha20poly1305_ietf_NSECBYTES�,crypto_aead_xchacha20poly1305_ietf_NPUBBYTES�)crypto_aead_xchacha20poly1305_ietf_ABYTES�3crypto_aead_xchacha20poly1305_ietf_MESSAGEBYTES_MAX�message�aad�nonce�key�returncCs(tt|t�dtjd�t|�}t|tkd�t�tjd�tt|t�p%|dudtjd�tt|t�o6t|�t	kd�t	�tjd�tt|t�oJt|�t
kd�t
�tjd�|r\|}t|�}ntj}d}|t
}t�d	�}t�d
|�}	t�|	|||||tj||�	}
t|
dkdtjd�t�|	|d�dd�S)aZ
    Encrypt the given ``message`` using the IETF ratified chacha20poly1305
    construction described in RFC7539.

    :param message:
    :type message: bytes
    :param aad:
    :type aad: Optional[bytes]
    :param nonce:
    :type nonce: bytes
    :param key:
    :type key: bytes
    :return: authenticated ciphertext
    :rtype: bytes
    � Input message type must be bytes��raising�%Message must be at most {} bytes longN�%Additional data must be bytes or None�,Nonce must be a {} bytes long bytes sequence�*Key must be a {} bytes long bytes sequencer�unsigned long long *�unsigned char[]�Encryption failed.)r�
isinstance�bytes�exc�	TypeError�lenr�format�
ValueErrorr	rr�NULLr
�newr�)crypto_aead_chacha20poly1305_ietf_encrypt�CryptoError�buffer�rrrr�mlen�_aad�aalen�mxout�clen�
ciphertext�res�r9�;/usr/lib/python3/dist-packages/nacl/bindings/crypto_aead.pyr.Ws^����

��	

��	

�r.r7cC�(tt|t�dtjd�t|�}t|tkd�t�tjd�tt|t�p%|dudtjd�tt|t�o6t|�t	kd�t	�tjd�tt|t�oJt|�t
kd�t
�tjd�|t}t�
d�}t�
d	|�}|rk|}t|�}	ntj}d
}	t�||tj||||	||�	}
t|
d
kdtjd�t�||d
�dd�S)aR
    Decrypt the given ``ciphertext`` using the IETF ratified chacha20poly1305
    construction described in RFC7539.

    :param ciphertext:
    :type ciphertext: bytes
    :param aad:
    :type aad: Optional[bytes]
    :param nonce:
    :type nonce: bytes
    :param key:
    :type key: bytes
    :return: message
    :rtype: bytes
    �#Input ciphertext type must be bytesr�(Ciphertext must be at most {} bytes longNrr r!r"r#r�Decryption failed.)rr%r&r'r(r)�*_aead_chacha20poly1305_ietf_CRYPTBYTES_MAXr*r+r	rr
rr-r,r�)crypto_aead_chacha20poly1305_ietf_decryptr/r0�r7rrrr6r5r2rr3r4r8r9r9r:r@��^����

��	

��	

�r@cC�0tt|t�dtjd�t|�}t|tkd�t�tjd�tt|t�p%|dudtjd�tt|t�o6t|�t	kd�t	�tjd�tt|t�oJt|�t
kd�t
�tjd�|r\|}t|�}ntj}d}t|�}|t
}t�d	�}t�d
|�}	t�|	|||||tj||�	}
t|
dkdtjd�t�|	|d�dd�S)a[
    Encrypt the given ``message`` using the "legacy" construction
    described in draft-agl-tls-chacha20poly1305.

    :param message:
    :type message: bytes
    :param aad:
    :type aad: Optional[bytes]
    :param nonce:
    :type nonce: bytes
    :param key:
    :type key: bytes
    :return: authenticated ciphertext
    :rtype: bytes
    rrrNrr r!rr"r#r$)rr%r&r'r(r)rr*r+rrrr,r
r-r�$crypto_aead_chacha20poly1305_encryptr/r0r1r9r9r:rD��`����

��	

��	

�rDcCr;)al
    Decrypt the given ``ciphertext`` using the "legacy" construction
    described in draft-agl-tls-chacha20poly1305.

    :param ciphertext: authenticated ciphertext
    :type ciphertext: bytes
    :param aad:
    :type aad: Optional[bytes]
    :param nonce:
    :type nonce: bytes
    :param key:
    :type key: bytes
    :return: message
    :rtype: bytes
    r<rr=Nrr r!r"r#rr>)rr%r&r'r(r)�%_aead_chacha20poly1305_CRYPTBYTES_MAXr*r+rrrrr-r,r�$crypto_aead_chacha20poly1305_decryptr/r0rAr9r9r:rGErBrGcCrC)aD
    Encrypt the given ``message`` using the long-nonces xchacha20poly1305
    construction.

    :param message:
    :type message: bytes
    :param aad:
    :type aad: Optional[bytes]
    :param nonce:
    :type nonce: bytes
    :param key:
    :type key: bytes
    :return: authenticated ciphertext
    :rtype: bytes
    rrrNrr r!rr"r#r$)rr%r&r'r(r)rr*r+rrrr,rr-r�*crypto_aead_xchacha20poly1305_ietf_encryptr/r0r1r9r9r:rH�rErHcCr;)aU
    Decrypt the given ``ciphertext`` using the long-nonces xchacha20poly1305
    construction.

    :param ciphertext: authenticated ciphertext
    :type ciphertext: bytes
    :param aad:
    :type aad: Optional[bytes]
    :param nonce:
    :type nonce: bytes
    :param key:
    :type key: bytes
    :return: message
    :rtype: bytes
    r<rr=Nrr r!r"r#rr>)rr%r&r'r(r)�+_aead_xchacha20poly1305_ietf_CRYPTBYTES_MAXr*r+rrrrr-r,r�*crypto_aead_xchacha20poly1305_ietf_decryptr/r0rAr9r9r:rJ�s^����

��	

��	

�rJN)4�typingr�naclrr'�nacl._sodiumrr�nacl.exceptionsr�*crypto_aead_chacha20poly1305_ietf_keybytesr�int�__annotations__�+crypto_aead_chacha20poly1305_ietf_nsecbytesr�+crypto_aead_chacha20poly1305_ietf_npubbytesr	�(crypto_aead_chacha20poly1305_ietf_abytesr
�2crypto_aead_chacha20poly1305_ietf_messagebytes_maxrr?�%crypto_aead_chacha20poly1305_keybytesr�&crypto_aead_chacha20poly1305_nsecbytesr
�&crypto_aead_chacha20poly1305_npubbytesr�#crypto_aead_chacha20poly1305_abytesr�-crypto_aead_chacha20poly1305_messagebytes_maxrrF�+crypto_aead_xchacha20poly1305_ietf_keybytesr�,crypto_aead_xchacha20poly1305_ietf_nsecbytesr�,crypto_aead_xchacha20poly1305_ietf_npubbytesr�)crypto_aead_xchacha20poly1305_ietf_abytesr�3crypto_aead_xchacha20poly1305_ietf_messagebytes_maxrrIr&r.r@rDrGrHrJr9r9r9r:�<module>s�

�
�
�
�
���
�
�
�
�
���
�
�
�
�
�������
�O����
�O����
�P����
�O����
�P�����

https://t.me/RX1948 - 2025