Server : LiteSpeed
System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
User : nandedex ( 1060)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /opt/cppython/lib/python3.8/site-packages/nacl/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]


Current File : //opt/cppython/lib/python3.8/site-packages/nacl/__pycache__/hash.cpython-38.pyc
U

O��g��	@sNdZddlZddlZejjZejjZejj	Z
ejjZejj
ZejjZejjZejjZejjZejjZejjZejjZejjZejjZ ejj!Z"ejj#Z$ej%j&fe'ej%j(e'd�dd�Z)ej%j&fe'ej%j(e'd�dd�Z*edddej%j&fe'e+e'e'e'ej%j(e'd	�d
d�Z,e,Z-dej%j&fe'e'ej%j(e'd�d
d�Z.e.Z/dej%j&fe'e'ej%j(e'd�dd�Z0dS)z�
The :mod:`nacl.hash` module exposes one-shot interfaces
for libsodium selected hash primitives and the constants needed
for their usage.
�N)�message�encoder�returncCs|�tj�|��S)z�
    Hashes ``message`` with SHA256.

    :param message: The message to hash.
    :type message: bytes
    :param encoder: A class that is able to encode the hashed message.
    :returns: The hashed message.
    :rtype: bytes
    )�encode�nacl�bindingsZcrypto_hash_sha256�rr�r	�6/opt/cppython/lib/python3.8/site-packages/nacl/hash.py�sha256>srcCs|�tj�|��S)z�
    Hashes ``message`` with SHA512.

    :param message: The message to hash.
    :type message: bytes
    :param encoder: A class that is able to encode the hashed message.
    :returns: The hashed message.
    :rtype: bytes
    )rrrZcrypto_hash_sha512rr	r	r
�sha512Msr�)�data�digest_size�key�salt�personrrcCst|||||d�}|�|�S)a�
    Hashes ``data`` with blake2b.

    :param data: the digest input byte sequence
    :type data: bytes
    :param digest_size: the requested digest size; must be at most
                        :const:`BLAKE2B_BYTES_MAX`;
                        the default digest size is
                        :const:`BLAKE2B_BYTES`
    :type digest_size: int
    :param key: the key to be set for keyed MAC/PRF usage; if set, the key
                must be at most :data:`~nacl.hash.BLAKE2B_KEYBYTES_MAX` long
    :type key: bytes
    :param salt: an initialization salt at most
                 :const:`BLAKE2B_SALTBYTES` long;
                 it will be zero-padded if needed
    :type salt: bytes
    :param person: a personalization string at most
                   :const:`BLAKE2B_PERSONALBYTES` long;
                   it will be zero-padded if needed
    :type person: bytes
    :param encoder: the encoder to use on returned digest
    :type encoder: class
    :returns: The hashed message.
    :rtype: bytes
    )rrrr)�	_b2b_hashr)rrrrrr�digestr	r	r
�blake2b\s#�r)rrrrcCst||�}|�|�S)a�
    Computes a keyed MAC of ``message`` using the short-input-optimized
    siphash-2-4 construction.

    :param message: The message to hash.
    :type message: bytes
    :param key: the message authentication key for the siphash MAC construct
    :type key: bytes(:const:`SIPHASH_KEYBYTES`)
    :param encoder: A class that is able to encode the hashed message.
    :returns: The hashed message.
    :rtype: bytes(:const:`SIPHASH_BYTES`)
    )�	_sip_hashr�rrrrr	r	r
�	siphash24�s
rcCst||�}|�|�S)aE
    Computes a keyed MAC of ``message`` using the 128 bit variant of the
    siphash-2-4 construction.

    :param message: The message to hash.
    :type message: bytes
    :param key: the message authentication key for the siphash MAC construct
    :type key: bytes(:const:`SIPHASHX_KEYBYTES`)
    :param encoder: A class that is able to encode the hashed message.
    :returns: The hashed message.
    :rtype: bytes(:const:`SIPHASHX_BYTES`)
    :raises nacl.exceptions.UnavailableError: If called when using a
        minimal build of libsodium.

    .. versionadded:: 1.2
    )�
_sip_hashxrrr	r	r
�
siphashx24�s
r)1�__doc__Z
nacl.bindingsrZ
nacl.encodingrZcrypto_generichash_BYTESZ
BLAKE2B_BYTESZcrypto_generichash_BYTES_MINZBLAKE2B_BYTES_MINZcrypto_generichash_BYTES_MAXZBLAKE2B_BYTES_MAXZcrypto_generichash_KEYBYTESZBLAKE2B_KEYBYTESZcrypto_generichash_KEYBYTES_MINZBLAKE2B_KEYBYTES_MINZcrypto_generichash_KEYBYTES_MAXZBLAKE2B_KEYBYTES_MAXZcrypto_generichash_SALTBYTESZBLAKE2B_SALTBYTESZ crypto_generichash_PERSONALBYTESZBLAKE2B_PERSONALBYTESZ crypto_shorthash_siphash24_BYTESZ
SIPHASH_BYTESZ#crypto_shorthash_siphash24_KEYBYTESZSIPHASH_KEYBYTESZhas_crypto_shorthash_siphashx24ZSIPHASHX_AVAILABLEZ!crypto_shorthash_siphashx24_BYTESZSIPHASHX_BYTESZ$crypto_shorthash_siphashx24_KEYBYTESZSIPHASHX_KEYBYTESZ(crypto_generichash_blake2b_salt_personalrZcrypto_shorthash_siphash24rZcrypto_shorthash_siphashx24r�encodingZ
HexEncoder�bytesZEncoderrr�intrZgenerichashrZ	shorthashrr	r	r	r
�<module>s|������)����

F1le Man4ger