/usr/lib/python3/dist-packages/nacl/pwhash/__pycache__
Edit: /usr/lib/python3/dist-packages/nacl/pwhash/__pycache__/argon2id.cpython-310.pyc (3858B)
o
ôåaQ ã @ sþ d dl Zd dlZddlmZ ejZejjZ ej
Z
ejZejZej
Z
ejZejZejZejjZejjZejjZejjZejjZejjZejjZejjZ ejj!Z"ejj#Z$ee ej%j&fde'de(de(de'de'd ej%j)d
e(fdd„Z*eefde(de'de'd
e(fd
d„Z+dS )é Né )Ú_argon2ÚsizeÚpasswordÚsaltÚopslimitÚmemlimitÚencoderÚreturnc
C s | tj | ||||t¡¡S )aŒ
Derive a ``size`` bytes long key from a caller-supplied
``password`` and ``salt`` pair using the argon2i
memory-hard construct.
the enclosing module provides the constants
- :py:const:`.OPSLIMIT_INTERACTIVE`
- :py:const:`.MEMLIMIT_INTERACTIVE`
- :py:const:`.OPSLIMIT_MODERATE`
- :py:const:`.MEMLIMIT_MODERATE`
- :py:const:`.OPSLIMIT_SENSITIVE`
- :py:const:`.MEMLIMIT_SENSITIVE`
as a guidance for correct settings.
:param size: derived key size, must be between
:py:const:`.BYTES_MIN` and
:py:const:`.BYTES_MAX`
:type size: int
:param password: password used to seed the key derivation procedure;
it length must be between
:py:const:`.PASSWD_MIN` and
:py:const:`.PASSWD_MAX`
:type password: bytes
:param salt: **RANDOM** salt used in the key derivation procedure;
its length must be exactly :py:const:`.SALTBYTES`
:type salt: bytes
:param opslimit: the time component (operation count)
of the key derivation procedure's computational cost;
it must be between
:py:const:`.OPSLIMIT_MIN` and
:py:const:`.OPSLIMIT_MAX`
:type opslimit: int
:param memlimit: the memory occupation component
of the key derivation procedure's computational cost;
it must be between
:py:const:`.MEMLIMIT_MIN` and
:py:const:`.MEMLIMIT_MAX`
:type memlimit: int
:rtype: bytes
.. versionadded:: 1.2
)ÚencodeÚnaclÚbindingsÚcrypto_pwhash_algÚALG)r r r r r r © r ú6/usr/lib/python3/dist-packages/nacl/pwhash/argon2id.pyÚkdf5 s
5ÿÿr c C s t j | ||t¡S )a¯
Hashes a password with a random salt, using the memory-hard
argon2id construct and returning an ascii string that has all
the needed info to check against a future password
The default settings for opslimit and memlimit are those deemed
correct for the interactive user login case.
:param bytes password:
:param int opslimit:
:param int memlimit:
:rtype: bytes
.. versionadded:: 1.2
)r r
Úcrypto_pwhash_str_algr )r r r r r r Ústrq s ÿr ),Ú
nacl.bindingsr Ú
nacl.encodingÚ r ÚALG_ARGON2ID13r r
Ú crypto_pwhash_argon2id_STRPREFIXÚ STRPREFIXÚ SALTBYTESÚ
PASSWD_MINÚ
PASSWD_MAXÚPWHASH_SIZEÚ BYTES_MINÚ BYTES_MAXÚverifyÚ#crypto_pwhash_argon2id_MEMLIMIT_MINÚMEMLIMIT_MINÚ#crypto_pwhash_argon2id_MEMLIMIT_MAXÚMEMLIMIT_MAXÚ#crypto_pwhash_argon2id_OPSLIMIT_MINÚOPSLIMIT_MINÚ#crypto_pwhash_argon2id_OPSLIMIT_MAXÚOPSLIMIT_MAXÚ+crypto_pwhash_argon2id_OPSLIMIT_INTERACTIVEÚOPSLIMIT_INTERACTIVEÚ+crypto_pwhash_argon2id_MEMLIMIT_INTERACTIVEÚMEMLIMIT_INTERACTIVEÚ)crypto_pwhash_argon2id_OPSLIMIT_SENSITIVEÚOPSLIMIT_SENSITIVEÚ)crypto_pwhash_argon2id_MEMLIMIT_SENSITIVEÚMEMLIMIT_SENSITIVEÚ(crypto_pwhash_argon2id_OPSLIMIT_MODERATEÚOPSLIMIT_MODERATEÚ(crypto_pwhash_argon2id_MEMLIMIT_MODERATEÚMEMLIMIT_MODERATEÚencodingÚ
RawEncoderÚintÚbytesÚEncoderr r r r r r Ú
sj ÿÿúÿþýüûú
ù>ýÿþýü