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/__pycache__/utils.cpython-310.pyc
o

��a%	�	@s�ddlZddlmZmZmZddlZddlmZeddd�ZGdd�de	�Z
Gdd	�d	�Zd
e	defdd
�Z
ddede	fdd�Zejfdede	dejde	fdd�ZdS)�N)�
SupportsBytes�Type�TypeVar)�encoding�_EncryptedMessage�EncryptedMessage)�boundc@sleZdZUdZeed<eed<edeededededef
d	d
��Z	e
defdd��Ze
defd
d��ZdS)rze
    A bytes subclass that holds a messaged that has been encrypted by a
    :class:`SecretBox`.
    �_nonce�_ciphertext�cls�nonce�
ciphertext�combined�returncCs||�}||_||_|S�N)r	r
)rrr
r�obj�r�,/usr/lib/python3/dist-packages/nacl/utils.py�_from_parts"szEncryptedMessage._from_partscC�|jS)zX
        The nonce used during the encryption of the :class:`EncryptedMessage`.
        )r	��selfrrrr.�zEncryptedMessage.noncecCr)zP
        The ciphertext contained within the :class:`EncryptedMessage`.
        )r
rrrrr
5rzEncryptedMessage.ciphertextN)
�__name__�
__module__�__qualname__�__doc__�bytes�__annotations__�classmethodrrr�propertyrr
rrrrrs(
�����c@seZdZdedefdd�ZdS)�StringFixerrrcCst|���Sr)�str�	__bytes__rrrr�__str__>szStringFixer.__str__N)rrrrr"r$rrrrr!=sr!�bytes_inrcCs
|�d�S)N�ascii)�decode)r%rrr�bytes_as_stringB�
r(� �sizecCs
t�|�Sr)�os�urandom)r+rrr�randomFr)r.�seed�encodercCstj�||�}|�|�S)z�
    Returns ``size`` number of deterministically generated pseudorandom bytes
    from a seed

    :param size: int
    :param seed: bytes
    :param encoder: The encoder class used to encode the produced bytes
    :rtype: bytes
    )�nacl�bindings�randombytes_buf_deterministic�encode)r+r/r0�raw_datarrr�randombytes_deterministicJs
r6)r*)r,�typingrrr�
nacl.bindingsr1rrrrr!r"r(�intr.�
RawEncoder�Encoderr6rrrr�<module>s&$�����