
    7g+
                        U d dl mZ d dlmZmZ d dl mZ  eej                  Z	 ej
                    Zeed<    ej                    Zeed<   d Zd Ze	r ej                    Z ej                    Zdededefd	Zdededefd
ZdS )    N)ffilib)ensureBYTESKEYBYTESdatakeyreturnc                    t          |          t          k    r,t          j        d                    t                              t          j        dt                    }t          j	        || t          |           |          }t          |dk    t          j                   t          j        |t                    dd         S )zCompute a fast, cryptographic quality, keyed hash of the input data

    :param data:
    :type data: bytes
    :param key: len(key) must be equal to
                :py:data:`.KEYBYTES` (16)
    :type key: bytes
    #Key length must be exactly {} bytesunsigned char[]r   raisingN)lenr   exc
ValueErrorformatr   newr   r   crypto_shorthash_siphash24r   RuntimeErrorbufferr   r	   digestrcs       X/var/www/html/syslog/venv/lib/python3.11/site-packages/nacl/bindings/crypto_shorthash.pyr   r   $   s     3xx8n188BB
 
 	
 W&..F		'c$ii	E	EB
27C,----:fe$$QQQ''    c                    t          t          dt          j                   t	          |          t
          k    r,t          j        d                    t
                              t          j	        dt                    }t          j        || t	          |           |          }t          |dk    t          j                   t          j        |t                    dd         S )aC  Compute a fast, cryptographic quality, keyed hash of the input data

    :param data:
    :type data: bytes
    :param key: len(key) must be equal to
                :py:data:`.XKEYBYTES` (16)
    :type key: bytes
    :raises nacl.exceptions.UnavailableError: If called when using a
        minimal build of libsodium.
    zNot available in minimal buildr   r   r   r   N)r   has_crypto_shorthash_siphashx24r   UnavailableErrorr   	XKEYBYTESr   r   r   r   XBYTESr   crypto_shorthash_siphashx24r   r   r   s       r   r"   r"   8   s     '($    3xx9n188CC
 
 	
 W&//F		(s4yy#	F	FB
27C,----:ff%%aaa((r   )nacl.exceptions
exceptionsr   nacl._sodiumr   r   r   bool&PYNACL_HAS_CRYPTO_SHORTHASH_SIPHASHX24r    crypto_shorthash_siphash24_bytesr   int__annotations__#crypto_shorthash_siphash24_keybytesr   r!   r    !crypto_shorthash_siphashx24_bytes$crypto_shorthash_siphashx24_keybytesbytesr   r"    r   r   <module>r0      s&           ! ! ! ! ! ! ! ! " " " " " " #'$.# #  2S133s 3 3 37799# 9 9 9	
	" ;2S244F88::I(U ( (5 ( ( ( (()e )% )E ) ) ) ) ) )r   