Files
pyGoEdge-UserPanel/.venv/Lib/site-packages/django/utils/__pycache__/crypto.cpython-312.pyc

36 lines
3.4 KiB
Plaintext
Raw Normal View History

2025-11-18 03:36:49 +08:00
<EFBFBD>
j<> if
<00><00>x<00>dZddlZddlZddlZddlmZddlmZGd<05>de<08>Z ddd<08>d <09>Z
d
Z e fd <0B>Z d <0C>Z dd <0A>Zy)z3
Django's standard crypto functions and utilities.
<EFBFBD>N)<01>settings)<01> force_bytesc<00><00>eZdZdZy)<03>InvalidAlgorithmz&Algorithm is not supported by hashlib.N)<04>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__doc__<5F><00><00>BE:\Project\pygoedge\.venv\Lib\site-packages\django/utils/crypto.pyrr s<00><00>0<>r r<00>sha1)<01> algorithmc<00>(<00>|<02>tj}t|<00>}t|<02>} tt|<03>}|||z<00>j<00>}tj|t|<01>|<04><03>S#t
$r}t d|z<00>|<05>d}~wwxYw)a*
Return the HMAC of 'value', using a key generated from key_salt and a
secret (which defaults to settings.SECRET_KEY). Default algorithm is SHA1,
but any algorithm name supported by hashlib can be passed.
A different key_salt should be passed in for every application of HMAC.
Nz6%r is not an algorithm accepted by the hashlib module.)<02>msg<73> digestmod)
r<00>
SECRET_KEYr<00>getattr<74>hashlib<69>AttributeErrorr<00>digest<73>hmac<61>new)<07>key_salt<6C>value<75>secretr<00>hasher<65>e<>keys r <00> salted_hmacr s<><00><00><0E>~<7E><19>$<24>$<24><06><1A>8<EFBFBD>$<24>H<EFBFBD> <18><16> <20>F<EFBFBD><11><18><17>)<29>,<2C><06> <11><18>F<EFBFBD>"<22>
#<23>
*<2A>
*<2A>
,<2C>C<EFBFBD>
<10>8<EFBFBD>8<EFBFBD>C<EFBFBD>[<5B><15>/<2F>6<EFBFBD> B<>B<><42> <1A><11><1E> D<>y<EFBFBD> P<>
<EFBFBD><10> <11><><11>s<00>A4<00>4 B<03>=B <03> B<03>>abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789c<00>J<00><01>dj<00>fd<02>t|<00>D<00><00>S)aG
Return a securely generated random string.
The bit length of the returned value can be calculated with the formula:
log_2(len(allowed_chars)^length)
For example, with default `allowed_chars` (26+26+10), this gives:
* length: 12, bit length =~ 71 bits
* length: 22, bit length =~ 131 bits
<20>c3<00>H<00>K<00>|]}tj<00><02><00><01><00>y<00>w<01>N)<02>secrets<74>choice)<03>.0<EFBFBD>i<> allowed_charss <20>r <00> <genexpr>z$get_random_string.<locals>.<genexpr>>s<00><><00><><00>H<>-<2D>Q<EFBFBD>7<EFBFBD>><3E>><3E>-<2D>0<>-<2D>s<00>")<02>join<69>range)<02>lengthr*s `r <00>get_random_stringr/3s<00><><00> <0E>7<EFBFBD>7<EFBFBD>H<>%<25><06>-<2D>H<> H<>Hr c<00>R<00>tjt|<00>t|<01><00>S)z:Return True if the two strings are equal, False otherwise.)r&<00>compare_digestr)<02>val1<6C>val2s r <00>constant_time_comparer4As<00><00> <12> !<21> !<21>+<2B>d<EFBFBD>"3<>[<5B><14>5F<35> G<>Gr c<00><><00>|<04>tj}|xsd}t|<00>}t|<01>}tj|<04>j||||<03>S)z)Return the hash of password using pbkdf2.N)r<00>sha256r<00> pbkdf2_hmac<61>name)<05>password<72>salt<6C>
iterations<EFBFBD>dklenrs r <00>pbkdf2r=FsL<00><00> <0A>~<7E><18><1E><1E><06> <11>M<EFBFBD>T<EFBFBD>E<EFBFBD><1A>8<EFBFBD>$<24>H<EFBFBD> <16>t<EFBFBD> <1C>D<EFBFBD> <12> <1E> <1E>v<EFBFBD>x<EFBFBD>}<7D>}<7D>h<EFBFBD><04>j<EFBFBD>%<25> P<>Pr r%)rN)r
rrr&<00> django.confr<00>django.utils.encodingr<00>
ValueErrorrr <00>RANDOM_STRING_CHARSr/r4r=r r r <00><module>rBsV<00><01><04><0F> <0B><0E> <20>-<2D> <09>z<EFBFBD> <09> C<01>6<EFBFBD>C<01>:W<01><13>-@<01> I<01>H<01>
Qr