
    #Ce                     &   d Z ddlZddlZej                  j
                  Z	 ej                  j                  Z	 ej                  j                  Z
	 ej                  j                  Z	 ej                  j                  Z	 ej                  j                  Z	 ej                  j"                  Z	 ej                  j&                  Z	 ej                  j*                  Z	 ej                  j.                  Z	 ej                  j2                  Z	 ej                  j6                  Z	 ej                  j:                  Z	 ej                  j>                  Z ej                  jB                  Z"ej                  jF                  Z$ejJ                  jL                  fde'dejJ                  jP                  de'fdZ)ejJ                  jL                  fde'dejJ                  jP                  de'fdZ*edddejJ                  jL                  fd	e'd
e+de'de'de'dejJ                  jP                  de'fdZ,e,Z-dejJ                  jL                  fde'de'dejJ                  jP                  de'fdZ.e.Z/dejJ                  jL                  fde'de'dejJ                  jP                  de'fdZ0y)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returnc                 ^    |j                  t        j                  j                  |             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bindingscrypto_hash_sha256r   r   s     )lib/python3.12/site-packages/nacl/hash.pysha256r   >   "     >>$--::7CDD    c                 ^    |j                  t        j                  j                  |             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
    )r   r   r	   crypto_hash_sha512r   s     r   sha512r   M   r   r   r   datadigest_sizekeysaltpersonc                 D    t        | ||||      }|j                  |      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
    )r   r   r   r   )	_b2b_hashr   )r   r   r   r   r   r   digests          r   blake2br   \   s+    F +3T&F >>&!!r   c                 <    t        | |      }|j                  |      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   r   r   r   r   s       r   	siphash24r      s    " w$F>>&!!r   c                 <    t        | |      }|j                  |      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_hashxr   r   s       r   
siphashx24r"      s    * %F>>&!!r   )1__doc__nacl.bindingsr   nacl.encodingr	   crypto_generichash_BYTESBLAKE2B_BYTEScrypto_generichash_BYTES_MINBLAKE2B_BYTES_MINcrypto_generichash_BYTES_MAXBLAKE2B_BYTES_MAXcrypto_generichash_KEYBYTESBLAKE2B_KEYBYTEScrypto_generichash_KEYBYTES_MINBLAKE2B_KEYBYTES_MINcrypto_generichash_KEYBYTES_MAXBLAKE2B_KEYBYTES_MAXcrypto_generichash_SALTBYTESBLAKE2B_SALTBYTES crypto_generichash_PERSONALBYTESBLAKE2B_PERSONALBYTES crypto_shorthash_siphash24_BYTESSIPHASH_BYTES#crypto_shorthash_siphash24_KEYBYTESSIPHASH_KEYBYTEShas_crypto_shorthash_siphashx24SIPHASHX_AVAILABLE!crypto_shorthash_siphashx24_BYTESSIPHASHX_BYTES$crypto_shorthash_siphashx24_KEYBYTESSIPHASHX_KEYBYTES(crypto_generichash_blake2b_salt_personalr   crypto_shorthash_siphash24r   crypto_shorthash_siphashx24r!   encoding
HexEncoderbytesEncoderr   r   intr   generichashr   	shorthashr"    r   r   <module>rK      s     66 2MM>>  :MM>>  :==<<  E}}DD  M}}DD  MMM>> FF ' >> *==DD  B]]BB  >@@ +MMFF  CMMBB	MM44	]]66
 6:]]5M5MEE!]]22E
E  6:]]5M5MEE!]]22E
E" %%)]]%=%=&"
&"&" 
&" 	&"
 &" ]]""&" &"R 
 %)]]%=%=""	" ]]""" 	"* 	
 %)]]%=%=""	" ]]""" 	"r   