CasperSecurity

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

o

��a0�@s�ddlZddlmZddlZddlmZejjZ	ejj
ZejjZ
ejjZejjZejjZejjZejjZejjZejjZejjZejjZGdd�d�Z 						
	dde!d
e!de"de"de"de"de"de!fdd�Z#dS)�N)�NoReturn)�bytes_as_stringc@s�eZdZdZeZeZeZ	e
Zdedddfdede
dededef
dd	�Zed
e
fdd��Zed
e
fd
d��Zed
efdd��Zded
dfdd�Zd
efdd�Zd
efdd�Zddd�Zd
efdd�ZdS)�blake2bzK
    :py:mod:`hashlib` API compatible blake2b algorithm implementation
    ��data�digest_size�key�salt�personcCs.t||||d�|_||_|r|�|�dSdS)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
        )rr	r
rN)�	_b2b_init�_state�_digest_size�update)�selfrrrr	r
�r�./usr/lib/python3/dist-packages/nacl/hashlib.py�__init__0s��zblake2b.__init__�returncCs|jS�N)r
�rrrrrUszblake2b.digest_sizecC�dS)N�rrrrr�
block_sizeY�zblake2b.block_sizecCr)Nrrrrrr�name]rzblake2b.nameNcCst|j|�dSr)�_b2b_updater)rrrrrraszblake2b.updatecCs|j��}t|�Sr)r�copy�
_b2b_final)r�_strrr�digestds
zblake2b.digestcCstt�|����Sr)r�binascii�hexlifyrrrrr�	hexdigesthszblake2b.hexdigestcCs$t|�|jd�}|j��}||_|S)N)r)�typerrr)r�_cprrrrrks
zblake2b.copycCstd�|jj���)zc
        Raise the same exception as hashlib's blake implementation
        on copy.copy()
        zcan't pickle {} objects)�	TypeError�format�	__class__�__name__rrrr�
__reduce__qs�zblake2b.__reduce__)rr)r(�
__module__�__qualname__�__doc__�BYTES�MAX_DIGEST_SIZE�KEYBYTES_MAX�MAX_KEY_SIZE�
PERSONALBYTES�PERSON_SIZE�	SALTBYTES�	SALT_SIZE�bytes�intr�propertyrr�strrrrr"rrr)rrrrr&sB�����
�%
rr�����@�passwordr	�n�r�p�maxmem�dklenrc	Cstjj|||||||d�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
    )rBrC)�nacl�bindings�%crypto_pwhash_scryptsalsa208sha256_ll)r>r	r?r@rArBrCrrr�scrypt{s�rG)rr9r:r;r<r=)$r �typingr�
nacl.bindingsrD�
nacl.utilsrrE�crypto_generichash_BYTESr-�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_MAXr/�crypto_generichash_SALTBYTESr3� crypto_generichash_PERSONALBYTESr1�&has_crypto_pwhash_scryptsalsa208sha256�SCRYPT_AVAILABLE�crypto_generichash_blake2b_initr� crypto_generichash_blake2b_finalr�!crypto_generichash_blake2b_updaterrr5r6rGrrrr�<module>sPW���������
Hacker Blog, Shell İndir, Sql İnjection, XSS Attacks, LFI Attacks, Social Hacking, Exploit Bot, Proxy Tools, Web Shell, PHP Shell, Alfa Shell İndir, Hacking Training Set, DDoS Script, Denial Of Service, Botnet, RFI Attacks, Encryption
Telegram @BIBIL_0DAY