HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/nacl/bindings/__pycache__/crypto_secretbox.cpython-310.pyc
o

��ab�@s�UddlmZddlmZmZddlmZe��Z	e
ed<e��Z
e
ed<e��Ze
ed<e��Ze
ed<e��Ze
ed<e��Ze
ed	<d
ededed
efdd�Zdededed
efdd�ZdS)�)�
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�returncC�t|�tkrt�d��t|�tkrt�d��dt|}t�dt|��}t�	||t|�||�}t
|dkdtjd�t�|t|��}|t
d�S)	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�
ValueErrorrrr�newr�crypto_secretboxr�CryptoError�bufferr	)rr
r�padded�
ciphertext�res�r!�@/usr/lib/python3/dist-packages/nacl/bindings/crypto_secretbox.pyrs


rrcCr)	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)rr
rr�	plaintextr r!r!r"r#9s

�r#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!r!r"�<module>s(
�����