https://t.me/AnonymousX5
Server : Apache
System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64
User : njnconst ( 1116)
PHP Version : 8.4.18
Disable Function : NONE
Directory :  /lib64/python2.7/site-packages/nacl/bindings/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib64/python2.7/site-packages/nacl/bindings/crypto_pwhash.pyc
�
y�\c@`s�ddlmZmZmZddlZddlmZddljZ	ddl
mZmZddlm
Z
ejejdej���Zej�Zej�Zej�Zej�Zej�Zej�Zej�Zej �Z!ej"�Z#ej$�Z%ej&�Z'ej(�Z)ej*�Z+ej,�Z-ej.�Z/ej0�Z1ej2�Z3ej4�Z5ej6�Z7ej8�Z9ej:�Z;ej<�Z=ej>�Z?ejejdej@���ZAejB�ZCejD�ZEejF�ZGejH�ZIejJ�ZKejL�ZMejN�ZOejP�ZQejR�ZSejT�ZUejejdejV���ZWejX�ZYejZ�Z[ej\�Z]ej^�Z_ej`�Zaejb�Zcejd�Zeejf�Zgejh�Ziejj�Zke'Zle)Zme+Zne-ZoeZpeZqdZrd	ZsdZtddZueud
�Zvd�Zwd
eud�Zxelemd�Zyd�Zzd�Z{d�Z|d�Z}d�Z~e~ZdS(i(tabsolute_importtdivisiontprint_functionN(t
integer_types(tffitlib(tensureschar *iii?i@i icC`srt|dkddtj�t|dkddtj�t||d@dkddtj�t|dkddtj�t|t|kdjt�dtj�t|dd	|>kdtj�|d
|}td
}t|d||kdtj�d||dd
}t|t|kdtj�t|tj|kdtj�t|||kddtj�dS(NisInvalid block sizetraisingsInvalid parallelization factoris Cost factor must be a power of 2sCost factor must be at least 2sp*r is greater than {0}ii�ii is7Memory limit would be exceeded with the choosen n, r, p(Rtexct
ValueErrort
SCRYPT_PR_MAXtformatt
UINT64_MAXtsystmaxsize(tntrtptmaxmemtBlentitVlen((s=/tmp/pip-install-A1qMVe/pynacl/nacl/bindings/crypto_pwhash.pyt_check_memory_occupation�s2









cC`s�|dkrd}nd}||dkrtd}|d|}x�tdd�D]}d||dkrOPqOqOWnq||d}x/tdd�D]}d||dkr�Pq�q�W|dd|}|d	kr�d	}n||}|||fS(
s/Python implementation of libsodium's pickparamsi�ii iii?ii�i���?(trange(topslimittmemlimitRRtmaxntn_log2tmaxrp((s=/tmp/pip-install-A1qMVe/pynacl/nacl/bindings/crypto_pwhash.pyt nacl_bindings_pick_scrypt_params�s$		
c	
C`stt|t�dt�tt|t�dt�tt|t�dt�tt|t�dt�tt|t�dt�t||||�tjd|�}tj	|t
|�|t
|�|||||�	}t|dkddtj�tj
tjd|�|�S(s1
    Derive a cryptographic key using the ``passwd`` and ``salt``
    given as input.

    The work factor can be tuned by by picking different
    values for the parameters

    :param bytes passwd:
    :param bytes salt:
    :param bytes salt: *must* be *exactly* :py:const:`.SALTBYTES` long
    :param int dklen:
    :param int opslimit:
    :param int n:
    :param int r: block size,
    :param int p: the parallelism factor
    :param int maxmem: the maximum available memory available for scrypt's
                       operations
    :rtype: bytes
    Rs	uint8_t[]is$Unexpected failure in key derivationschar *(Rt
isinstanceRt	TypeErrortbytesRRtnewRt%crypto_pwhash_scryptsalsa208sha256_lltlenRtRuntimeErrortbuffertcast(	tpasswdtsaltRRRtdklenRtbuftret((s=/tmp/pip-install-A1qMVe/pynacl/nacl/bindings/crypto_pwhash.pyR"�s&	
cC`s\tjdt�}tj||t|�||�}t|dkddtj�tj	|�S(s
    Derive a cryptographic key using the ``passwd`` and ``salt``
    given as input, returning a string representation which includes
    the salt and the tuning parameters.

    The returned string can be directly stored as a password hash.

    See :py:func:`.crypto_pwhash_scryptsalsa208sha256` for a short
    discussion about ``opslimit`` and ``memlimit`` values.

    :param bytes passwd:
    :param int opslimit:
    :param int memlimit:
    :return: serialized key hash, including salt and tuning parameters
    :rtype: bytes
    schar[]is&Unexpected failure in password hashingR(
RR!tSCRYPT_STRBYTESRt&crypto_pwhash_scryptsalsa208sha256_strR#RRR$tstring(R'RRR*R+((s=/tmp/pip-install-A1qMVe/pynacl/nacl/bindings/crypto_pwhash.pyR-s		
cC`satt|�tdkddtj�tj||t|��}t|dkddtj�tS(s�
    Verifies the ``passwd`` against the ``passwd_hash`` that was generated.
    Returns True or False depending on the success

    :param passwd_hash: bytes
    :param passwd: bytes
    :rtype: boolean
    isInvalid password hashRisWrong password(	RR#R,RR	Rt-crypto_pwhash_scryptsalsa208sha256_str_verifytInvalidkeyErrortTrue(tpasswd_hashR'R+((s=/tmp/pip-install-A1qMVe/pynacl/nacl/bindings/crypto_pwhash.pyR/$s

	
cC`si|tkr�|tkr3tjdjt���n'|tkrZtjdjt���n|tkr�tjdjt���qe|tkretjdjt���qen�|tkrV|t	kr�tjdjt	���n'|t
krtjdjt
���n|tkr,tjdjt���qe|tkretjdjt���qentj
d��dS(Ns#memlimit must be at least {0} bytess"memlimit must be at most {0} bytessopslimit must be at least {0}sopslimit must be at most {0}sUnsupported algorithm(tcrypto_pwhash_ALG_ARGON2I13t"crypto_pwhash_argon2i_MEMLIMIT_MINRR	Rt"crypto_pwhash_argon2i_MEMLIMIT_MAXt"crypto_pwhash_argon2i_OPSLIMIT_MINt"crypto_pwhash_argon2i_OPSLIMIT_MAXtcrypto_pwhash_ALG_ARGON2ID13t#crypto_pwhash_argon2id_MEMLIMIT_MINt#crypto_pwhash_argon2id_MEMLIMIT_MAXt#crypto_pwhash_argon2id_OPSLIMIT_MINt#crypto_pwhash_argon2id_OPSLIMIT_MAXR(RRtalg((s=/tmp/pip-install-A1qMVe/pynacl/nacl/bindings/crypto_pwhash.pyt_check_argon2_limits_alg;s6c	C`s�tt|t�dtj�tt|t�dtj�tt|t�dtj�tt|t�dtj�tt|t�dtj�t|�tkr�tjdj	t���n|t
kr�tjdj	t
���n'|tkrtjdj	t���nt|||�t
jd|�}tj|||t|�||||�}t|dkddtj�t
j||�S(s�
    Derive a raw cryptographic key using the ``passwd`` and the ``salt``
    given as input to the ``alg`` algorithm.

    :param outlen: the length of the derived key
    :type outlen: int
    :param passwd: The input password
    :type passwd: bytes
    :param opslimit: computational cost
    :type opslimit: int
    :param memlimit: memory cost
    :type memlimit: int
    :param alg: algorithm identifier
    :type alg: int
    :return: derived key
    :rtype: bytes
    Rs#salt must be exactly {0} bytes longs+derived key must be at least {0} bytes longs*derived key must be at most {0} bytes longsunsigned char[]is$Unexpected failure in key derivation(RRRRRR R#tcrypto_pwhash_SALTBYTESR	Rtcrypto_pwhash_BYTES_MINtcrypto_pwhash_BYTES_MAXR>RR!Rt
crypto_pwhashR$R%(toutlenR'R(RRR=toutbufR+((s=/tmp/pip-install-A1qMVe/pynacl/nacl/bindings/crypto_pwhash.pytcrypto_pwhash_alg\s8





cC`s�tt|t�dt�tt|t�dt�tt|t�dt�t|||�tjdd�}tj	||t
|�|||�}t|dkddtj�tj
|�S(s
    Derive a cryptographic key using the ``passwd`` given as input
    and a random ``salt``, returning a string representation which
    includes the salt, the tuning parameters and the used algorithm.

    :param passwd: The input password
    :type passwd: bytes
    :param opslimit: computational cost
    :type opslimit: int
    :param memlimit: memory cost
    :type memlimit: int
    :param alg: The algorithm to use
    :type alg: int
    :return: serialized derived key and parameters
    :rtype: bytes
    Rschar[]i�is$Unexpected failure in key derivation(RRRRR R>RR!Rtcrypto_pwhash_str_algR#RR$R.(R'RRR=RDR+((s=/tmp/pip-install-A1qMVe/pynacl/nacl/bindings/crypto_pwhash.pyRF�s
cC`s�tt|t�dt�tt|t�dt�tt|�dkddtj�tj||t|��}t|dkddtj	�t
S(s4
    Verifies the ``passwd`` against a given password hash.

    Returns True on success, raises InvalidkeyError on failure
    :param passwd_hash: saved password hash
    :type passwd_hash: bytes
    :param passwd: password to be checked
    :type passwd: bytes
    :return: success
    :rtype: boolean
    Ris#Hash must be at most 127 bytes longisWrong password(RRR RR#RR	Rtcrypto_pwhash_str_verifyR0R1(R2R'R+((s=/tmp/pip-install-A1qMVe/pynacl/nacl/bindings/crypto_pwhash.pyRG�s

i@i���?ll����i(�t
__future__RRRR
tsixRtnacl.exceptionst
exceptionsRtnacl._sodiumRRRR.R&t,crypto_pwhash_scryptsalsa208sha256_strprefixt,crypto_pwhash_scryptsalsa208sha256_STRPREFIXt,crypto_pwhash_scryptsalsa208sha256_saltbytest,crypto_pwhash_scryptsalsa208sha256_SALTBYTESt+crypto_pwhash_scryptsalsa208sha256_strbytest+crypto_pwhash_scryptsalsa208sha256_STRBYTESt-crypto_pwhash_scryptsalsa208sha256_passwd_mint-crypto_pwhash_scryptsalsa208sha256_PASSWD_MINt-crypto_pwhash_scryptsalsa208sha256_passwd_maxt-crypto_pwhash_scryptsalsa208sha256_PASSWD_MAXt,crypto_pwhash_scryptsalsa208sha256_bytes_mint,crypto_pwhash_scryptsalsa208sha256_BYTES_MINt,crypto_pwhash_scryptsalsa208sha256_bytes_maxt,crypto_pwhash_scryptsalsa208sha256_BYTES_MAXt/crypto_pwhash_scryptsalsa208sha256_memlimit_mint/crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_MINt/crypto_pwhash_scryptsalsa208sha256_memlimit_maxt/crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_MAXt/crypto_pwhash_scryptsalsa208sha256_opslimit_mint/crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_MINt/crypto_pwhash_scryptsalsa208sha256_opslimit_maxt/crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_MAXt7crypto_pwhash_scryptsalsa208sha256_opslimit_interactivet7crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_INTERACTIVEt7crypto_pwhash_scryptsalsa208sha256_memlimit_interactivet7crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_INTERACTIVEt5crypto_pwhash_scryptsalsa208sha256_opslimit_sensitivet5crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_SENSITIVEt5crypto_pwhash_scryptsalsa208sha256_memlimit_sensitivet5crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_SENSITIVEtcrypto_pwhash_alg_argon2i13R3tcrypto_pwhash_alg_argon2id13R8tcrypto_pwhash_alg_defaulttcrypto_pwhash_ALG_DEFAULTtcrypto_pwhash_saltbytesR?tcrypto_pwhash_strbytestcrypto_pwhash_STRBYTEStcrypto_pwhash_passwd_mintcrypto_pwhash_PASSWD_MINtcrypto_pwhash_passwd_maxtcrypto_pwhash_PASSWD_MAXtcrypto_pwhash_bytes_minR@tcrypto_pwhash_bytes_maxRAtcrypto_pwhash_argon2i_strprefixtcrypto_pwhash_argon2i_STRPREFIXt"crypto_pwhash_argon2i_memlimit_minR4t"crypto_pwhash_argon2i_memlimit_maxR5t"crypto_pwhash_argon2i_opslimit_minR6t"crypto_pwhash_argon2i_opslimit_maxR7t*crypto_pwhash_argon2i_opslimit_interactivet*crypto_pwhash_argon2i_OPSLIMIT_INTERACTIVEt*crypto_pwhash_argon2i_memlimit_interactivet*crypto_pwhash_argon2i_MEMLIMIT_INTERACTIVEt'crypto_pwhash_argon2i_opslimit_moderatet'crypto_pwhash_argon2i_OPSLIMIT_MODERATEt'crypto_pwhash_argon2i_memlimit_moderatet'crypto_pwhash_argon2i_MEMLIMIT_MODERATEt(crypto_pwhash_argon2i_opslimit_sensitivet(crypto_pwhash_argon2i_OPSLIMIT_SENSITIVEt(crypto_pwhash_argon2i_memlimit_sensitivet(crypto_pwhash_argon2i_MEMLIMIT_SENSITIVEt crypto_pwhash_argon2id_strprefixt crypto_pwhash_argon2id_STRPREFIXt#crypto_pwhash_argon2id_memlimit_minR9t#crypto_pwhash_argon2id_memlimit_maxR:t#crypto_pwhash_argon2id_opslimit_minR;t#crypto_pwhash_argon2id_opslimit_maxR<t+crypto_pwhash_argon2id_opslimit_interactivet+crypto_pwhash_argon2id_OPSLIMIT_INTERACTIVEt+crypto_pwhash_argon2id_memlimit_interactivet+crypto_pwhash_argon2id_MEMLIMIT_INTERACTIVEt(crypto_pwhash_argon2id_opslimit_moderatet(crypto_pwhash_argon2id_OPSLIMIT_MODERATEt(crypto_pwhash_argon2id_memlimit_moderatet(crypto_pwhash_argon2id_MEMLIMIT_MODERATEt)crypto_pwhash_argon2id_opslimit_sensitivet)crypto_pwhash_argon2id_OPSLIMIT_SENSITIVEt)crypto_pwhash_argon2id_memlimit_sensitivet)crypto_pwhash_argon2id_MEMLIMIT_SENSITIVEtSCRYPT_OPSLIMIT_INTERACTIVEtSCRYPT_MEMLIMIT_INTERACTIVEtSCRYPT_OPSLIMIT_SENSITIVEtSCRYPT_MEMLIMIT_SENSITIVEtSCRYPT_SALTBYTESR,R
tLOG2_UINT64_MAXRtSCRYPT_MAX_MEMRRR"R-R/R>RERFRGt crypto_pwhash_argon2i_str_verify(((s=/tmp/pip-install-A1qMVe/pynacl/nacl/bindings/crypto_pwhash.pyt<module>s�
(	0		!	8	%	

https://t.me/AnonymousX5 - 2025