o
    ç÷¡g  ã                   @   s”   U d dl mZ d dlmZmZ d dlmZ e ¡ Z	e
ed< e ¡ Ze
ed< e ¡ Ze
ed< dedefd	d
„Zdedefdd„Zdedefdd„ZdS )é    )Ú
exceptions)ÚffiÚlib)ÚensureÚcrypto_hash_BYTESÚcrypto_hash_sha256_BYTESÚcrypto_hash_sha512_BYTESÚmessageÚreturnc                 C   óF   t  dt¡}t || t| ƒ¡}t|dkdtjd� t  	|t¡dd… S ©zb
    Hashes and returns the message ``message``.

    :param message: bytes
    :rtype: bytes
    zunsigned char[]r   zUnexpected library error)ÚraisingN)
r   Únewr   r   Úcrypto_hashÚlenr   ÚexcÚRuntimeErrorÚbuffer©r	   ÚdigestÚrc© r   úD/usr/local/lib/python3.10/dist-packages/nacl/bindings/crypto_hash.pyr      ó   r   c                 C   r   r   )
r   r   r   r   Úcrypto_hash_sha256r   r   r   r   r   r   r   r   r   r   (   r   r   c                 C   r   r   )
r   r   r   r   Úcrypto_hash_sha512r   r   r   r   r   r   r   r   r   r   5   r   r   N)Únaclr   r   Únacl._sodiumr   r   Únacl.exceptionsr   Úcrypto_hash_sha512_bytesr   ÚintÚ__annotations__Úcrypto_hash_sha256_bytesr   r   Úbytesr   r   r   r   r   r   r   Ú<module>   s   