/usr/lib/python3/dist-packages/nacl/__pycache__
NameSizeModeActions
encoding.cpython-310.pyc34580644editdlrm
exceptions.cpython-310.pyc24090644editdlrm
hash.cpython-310.pyc50440644editdlrm
hashlib.cpython-310.pyc46000644editdlrm
public.cpython-310.pyc132900644editdlrm
secret.cpython-310.pyc98220644editdlrm
signing.cpython-310.pyc78120644editdlrm
utils.cpython-310.pyc25940644editdlrm
__init__.cpython-310.pyc5670644editdlrm
Edit: /usr/lib/python3/dist-packages/nacl/__pycache__/hashlib.cpython-310.pyc (4600B)
o a0@sddlZddlmZddlZddlmZejjZ ejj Z ejj Z ejjZejjZejjZejjZejjZejjZejjZejjZejjZGdddZ    dd e!d e!de"de"de"de"de"de!fddZ#dS)N)NoReturn)bytes_as_stringc @seZdZdZeZeZeZ e Z dedddfde de de de de f dd Zed e fd d Zed e fd dZed efddZde d dfddZd e fddZd efddZdddZd efddZdS)blake2bzK :py:mod:`hashlib` API compatible blake2b algorithm implementation data digest_sizekeysaltpersoncCs.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_sizeupdate)selfrrrr r r./usr/lib/python3/dist-packages/nacl/hashlib.py__init__0szblake2b.__init__returncCs|jSN)r rrrrrUszblake2b.digest_sizecCdS)Nrrrrr block_sizeYzblake2b.block_sizecCr)Nrrrrrrname]rz blake2b.nameNcCst|j|dSr) _b2b_updater )rrrrrraszblake2b.updatecCs|j}t|Sr)r copy _b2b_final)r_strrrdigestds zblake2b.digestcCstt|Sr)rbinasciihexlifyrrrrr 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) TypeErrorformat __class____name__rrrr __reduce__qs zblake2b.__reduce__)rr)r( __module__ __qualname____doc__BYTESMAX_DIGEST_SIZE KEYBYTES_MAX MAX_KEY_SIZE PERSONALBYTES PERSON_SIZE SALTBYTES SALT_SIZEbytesintrpropertyrrstrrrrr"rrr)rrrrr&sB % rr@passwordr nrpmaxmemdklenrc Cstjj|||||||dS)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)naclbindings%crypto_pwhash_scryptsalsa208sha256_ll)r>r r?r@rArBrCrrrscrypt{srG)rr9r:r;r<r=)$r typingr nacl.bindingsrD nacl.utilsrrEcrypto_generichash_BYTESr-crypto_generichash_BYTES_MIN BYTES_MINcrypto_generichash_BYTES_MAX BYTES_MAXcrypto_generichash_KEYBYTESKEYBYTEScrypto_generichash_KEYBYTES_MIN KEYBYTES_MINcrypto_generichash_KEYBYTES_MAXr/crypto_generichash_SALTBYTESr3 crypto_generichash_PERSONALBYTESr1&has_crypto_pwhash_scryptsalsa208sha256SCRYPT_AVAILABLEcrypto_generichash_blake2b_initr crypto_generichash_blake2b_finalr!crypto_generichash_blake2b_updaterrr5r6rGrrrrsP  W