Files
ServerSync/lib/nacl/pwhash/__pycache__/scrypt.cpython-314.pyc

99 lines
7.9 KiB
Plaintext
Raw Normal View History

2026-02-12 02:28:23 +02:00
+
u<10>iF<00><00><><00>^RIHt^RIt^RIt^RIHt^RIHt]PPt ]PPt ]PPt]PP t]PP$t]PP(t] ^,
t]PP.t]PP2t]PP6t]PP:t]PP>t ]PPBt"]PPFt$]PPJt&]PPNt(]PPRt*^]$,t+^]&,t,](]*]PZP\3RRllt/]$]&3RRllt0R R
lt1R#) <0B>)<01>castN)<01>
exceptions)<01>ensurec<00><><00>V^8<>dQhR\R\R\R\R\R\PPR\/#)<08><00>size<7A>password<72>salt<6C>opslimit<69>memlimit<69>encoder<65>return)<05>int<6E>bytes<65>nacl<63>encoding<6E>Encoder)<01>formats"<22>9/tmp/pip-target-zhdecbcm/lib/python/nacl/pwhash/scrypt.py<70> __annotate__r;sa<00><00>X<06>X<06>
<0A>X<06><13>X<06> <10>X<06><12> X<06>
<12> X<06> <12>]<5D>]<5D> "<22> "<22> X<06> <0B>X<06>c <04><><00>\\R\PR7\\ V4\
8HR\
: R\ V4: R2\P R7\PPW44wrgpVR,p VP\PPVV\\^V,4VVV VR74#)a<>
Derive a ``size`` bytes long key from a caller-supplied
``password`` and ``salt`` pair using the scryptsalsa208sha256
memory-hard construct.
the enclosing module provides the constants
- :py:const:`.OPSLIMIT_INTERACTIVE`
- :py:const:`.MEMLIMIT_INTERACTIVE`
- :py:const:`.OPSLIMIT_SENSITIVE`
- :py:const:`.MEMLIMIT_SENSITIVE`
- :py:const:`.OPSLIMIT_MODERATE`
- :py:const:`.MEMLIMIT_MODERATE`
as a guidance for correct settings respectively for the
interactive login and the long term key protecting sensitive data
use cases.
: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
:raises nacl.exceptions.UnavailableError: If called when using a
minimal build of libsodium.
.. versionadded:: 1.2
<EFBFBD>Not available in minimal build<6C><01>raisingzThe salt must be exactly z, not z bytes long)<02>maxmem<65>dkleni)r<00> AVAILABLE<4C>exc<78>UnavailableError<6F>len<65> SALTBYTES<45>
ValueErrorr<00>bindings<67> nacl_bindings_pick_scrypt_params<6D>encode<64>%crypto_pwhash_scryptsalsa208sha256_llrr)
rr r
r r r <00>n_log2<67>r<>prs
&&&&&& r<00>kdfr+;s<><00><00>r <0B><11>(<28><13>$<24>$<24><06>  <0B> <0B>D<EFBFBD> <09>Y<EFBFBD><1E> <14>c<EFBFBD>$<24>i<EFBFBD> !<21><13><0E><0E> <06><18>=<3D>=<3D>A<>A<><10><06>L<EFBFBD>F<EFBFBD>q<EFBFBD><16><15> <1F>F<EFBFBD> <12>><3E>><3E> <0C> <0A> <0A>;<3B>;<3B> <14> <10> <11><13>a<EFBFBD><16>i<EFBFBD> <20> <0A> <0A><19><16> <<3C>
<EFBFBD> <06> rc<00>H<00>V^8<>dQhR\R\R\R\/#)rr r r r)rr)rs"rrr<00>s0<00><00><06><06><13><06><11><06><12><06> <0B> rc<04><><00>\\R\PR7\P
P WV4#)a<>
Hashes a password with a random salt, using the memory-hard
scryptsalsa208sha256 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
:raises nacl.exceptions.UnavailableError: If called when using a
minimal build of libsodium.
.. versionadded:: 1.2
rr)rrrr rr$<00>&crypto_pwhash_scryptsalsa208sha256_str)r r r s&&&r<00>strr/<00>s9<00><00>, <0B><11>(<28><13>$<24>$<24><06> <10>=<3D>=<3D> ?<3F> ?<3F><10>H<EFBFBD> <06>rc<00><<00>V^8<>dQhR\R\R\/#)r<00> password_hashr r)r<00>bool)rs"rrr<00>s!<00><00><06><06>%<25><06>5<EFBFBD><06>T<EFBFBD>rc<04><00>\\R\PR7\\ V4\
8HR\ PP,\PR7\ PPW4#)a3
Takes the output of scryptsalsa208sha256 and compares it against
a user provided password to see if they are the same
:param password_hash: bytes
:param password: bytes
:rtype: boolean
:raises nacl.exceptions.UnavailableError: If called when using a
minimal build of libsodium.
.. versionadded:: 1.2
rrz/The password hash must be exactly %s bytes long) rrrr r!<00> PWHASH_SIZErr$<00>+crypto_pwhash_scryptsalsa208sha256_STRBYTESr#<00>-crypto_pwhash_scryptsalsa208sha256_str_verify)r1r s&&r<00>verifyr7<00>sk<00><00> <0B><11>(<28><13>$<24>$<24><06>  <0B> <0B>M<EFBFBD><1A>k<EFBFBD>)<29>9<>
<0E>-<2D>-<2D>
C<EFBFBD>
C<EFBFBD> D<01><13><0E><0E> <06> <10>=<3D>=<3D> F<> F<><15> <06>r)2<>typingr<00> nacl.bindingsr<00> nacl.encodingrr<00>nacl.exceptionsrr$r5<00>_strbytes_plus_one<6E>&has_crypto_pwhash_scryptsalsa208sha256r<00>,crypto_pwhash_scryptsalsa208sha256_STRPREFIX<49> STRPREFIX<49>,crypto_pwhash_scryptsalsa208sha256_SALTBYTESr"<00>-crypto_pwhash_scryptsalsa208sha256_PASSWD_MIN<49>
PASSWD_MIN<EFBFBD>-crypto_pwhash_scryptsalsa208sha256_PASSWD_MAX<41>
PASSWD_MAXr4<00>,crypto_pwhash_scryptsalsa208sha256_BYTES_MIN<49> BYTES_MIN<49>,crypto_pwhash_scryptsalsa208sha256_BYTES_MAX<41> BYTES_MAX<41>/crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_MIN<49> MEMLIMIT_MIN<49>/crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_MAX<41> MEMLIMIT_MAX<41>/crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_MIN<49> OPSLIMIT_MIN<49>/crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_MAX<41> OPSLIMIT_MAX<41>7crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_INTERACTIVE<56>OPSLIMIT_INTERACTIVE<56>7crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_INTERACTIVE<56>MEMLIMIT_INTERACTIVE<56>5crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_SENSITIVE<56>OPSLIMIT_SENSITIVE<56>5crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_SENSITIVE<56>MEMLIMIT_SENSITIVE<56>OPSLIMIT_MODERATE<54>MEMLIMIT_MODERATEr<00>
RawEncoderr+r/r7<00>rr<00><module>r]sn<00><01><18><14><14>"<22>"<22><19>]<5D>]<5D>N<>N<><12> <10>M<EFBFBD>M<EFBFBD> @<40> @<40> <09> <10>M<EFBFBD>M<EFBFBD> F<> F<> <09> <10>M<EFBFBD>M<EFBFBD> F<> F<> <09> <11>]<5D>]<5D> H<> H<>
<EFBFBD> <11>]<5D>]<5D> H<> H<>
<EFBFBD> <20>1<EFBFBD>$<24> <0B> <10>M<EFBFBD>M<EFBFBD> F<> F<> <09> <10>M<EFBFBD>M<EFBFBD> F<> F<> <09><13>}<7D>}<7D>L<>L<> <0C><13>}<7D>}<7D>L<>L<> <0C><13>}<7D>}<7D>L<>L<> <0C><13>}<7D>}<7D>L<>L<> <0C> <09>M<EFBFBD>M<EFBFBD>I<>I<><15> <09>M<EFBFBD>M<EFBFBD>I<>I<><15> <09>M<EFBFBD>M<EFBFBD>G<>G<><13> <09>M<EFBFBD>M<EFBFBD>G<>G<><13><16>,<2C>,<2C><11><15>,<2C>,<2C><11>'<27>&<26>%)<29>]<5D>]<5D>%=<3D>%=<3D> X<06>z)<29>(<28><06>Br