Files
wg-backend-django/dell-env/lib/python3.11/site-packages/werkzeug/__pycache__/security.cpython-311.pyc

69 lines
7.1 KiB
Plaintext
Raw Normal View History

2023-10-30 14:40:43 +07:00
<EFBFBD>
w]?e-<00>
<00>X<00>UddlZddlZddlZddlZddlZddlZejr dZdZ e
d<04>ej ej j fD<00><00><00><00>Zejeed<dedefd<08>Zd ed
ed edejeeffd <0C>Z dd ed ededefd<10>Zded edefd<12>Zdededejefd<15>ZdS)<17>N<>>abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789i<39><69>c#<00>*K<00>|]}|<01>|dk<00>
|V<00><00>dS)N<>/<2F>)<02>.0<EFBFBD>seps <20>j/home/infidel/Sync/TIP/WireGuard/ocp-wg-backend/dell-env/lib/python3.11/site-packages/werkzeug/security.py<70> <genexpr>r
s3<00><00><00><00>!<02>!<02> <0F>s<EFBFBD><EFBFBD>3<EFBFBD>#<23>:<3A>:<3A>C<EFBFBD>:<3A>:<3A>:<3A>:<3A>!<02>!<02><00> _os_alt_seps<70>length<74>returnc<00><><00>|dkrtd<02><00><00>d<03>d<04>t|<00><00>D<00><00><00><00>S)zAGenerate a random string of SALT_CHARS with specified ``length``.rzSalt length must be positive<76>c3<00>HK<00>|]}tjt<00><00>V<00><00>dS<00>N)<03>secrets<74>choice<63>
SALT_CHARS)r<00>_s r r
zgen_salt.<locals>.<genexpr>s,<00><00><00><00>E<>E<>!<21>7<EFBFBD>><3E>*<2A>-<2D>-<2D>E<>E<>E<>E<>E<>Er )<03>
ValueError<EFBFBD>join<69>range)r s r <00>gen_saltrsA<00><00> <0A><11>{<7B>{<7B><18>7<>8<>8<>8<> <0A>7<EFBFBD>7<EFBFBD>E<>E<>u<EFBFBD>V<EFBFBD>}<7D>}<7D>E<>E<>E<> E<> E<>Er <00>method<6F>salt<6C>passwordc<00><><00>|dkr||fS|<01>d<02><00>}|<02>d<02><00>}|<00>d<03><00>r<>|std<04><00><00>|dd<06><00>d<07><00>}t |<03><00>dvrtd <09><00><00>|<03>d
<EFBFBD><00>}|rt |d
pd
<EFBFBD><00>nt}tj ||||<04><00><00>
<00><00>d|<00>d|<04><00>fS|r*tj |||<00><00><00> <00><00>|fStj ||<02><00><00> <00><00>|fS) z<>Internal password hash helper. Supports plaintext without salt,
unsalted and salted passwords. In case salted passwords are used
hmac is used.
<20>plainzutf-8zpbkdf2:zSalt is required for PBKDF2<46>N<>:)<02><00>z&Invalid number of arguments for PBKDF2r)<0E>encode<64>
startswithr<00>split<69>len<65>pop<6F>int<6E>DEFAULT_PBKDF2_ITERATIONS<4E>hashlib<69> pbkdf2_hmac<61>hex<65>hmac<61>new<65> hexdigest)rrr<00>args<67>
iterationss r <00>_hash_internalr3sc<00><00>
<0E><17><18><18><17><16><1F><1F> <0F>;<3B>;<3B>w<EFBFBD> <1F> <1F>D<EFBFBD><17><EFBFBD><EFBFBD>w<EFBFBD>'<27>'<27>H<EFBFBD> <0A><18><18><19>#<23>#<23>
<EFBFBD><13> <<3C><1C>:<3A>;<3B>;<3B> ;<3B><15>a<EFBFBD>b<EFBFBD>b<EFBFBD>z<EFBFBD><1F><1F><03>$<24>$<24><04> <0E>t<EFBFBD>9<EFBFBD>9<EFBFBD>F<EFBFBD> "<22> "<22><1C>E<>F<>F<> F<><15><18><18>!<21><1B><1B><06>*.<2E>M<>S<EFBFBD><14>a<EFBFBD><17><1C>A<EFBFBD>&<26>&<26>&<26>4M<34>
<EFBFBD> <13> <1F><06><08>$<24>
<EFBFBD> C<> C<> G<> G<> I<> I<> +<2B>f<EFBFBD> +<2B> +<2B>z<EFBFBD> +<2B> +<2B>
<EFBFBD>
<EFBFBD>
 <0C>D<01><13>x<EFBFBD><04>h<EFBFBD><06>/<2F>/<2F>9<>9<>;<3B>;<3B>V<EFBFBD>C<>C<> <12>;<3B>v<EFBFBD>x<EFBFBD> (<28> (<28> 2<> 2<> 4<> 4<>f<EFBFBD> <<3C><r <00> pbkdf2:sha256<35><00> salt_lengthc<00>l<00>|dkrt|<02><00>nd}t|||<00><00>\}}|<05>d|<03>d|<04><00>S)a<>Hash a password with the given method and salt with a string of
the given length. The format of the string returned includes the method
that was used so that :func:`check_password_hash` can check the hash.
The format for the hashed string looks like this::
method$salt$hash
This method can **not** generate unsalted passwords but it is possible
to set param method='plain' in order to enforce plaintext passwords.
If a salt is used, hmac is used internally to salt the password.
If PBKDF2 is wanted it can be enabled by setting the method to
``pbkdf2:method:iterations`` where iterations is optional::
pbkdf2:sha256:80000$salt$hash
pbkdf2:sha256$salt$hash
:param password: the password to hash.
:param method: the hash method to use (one that hashlib supports). Can
optionally be in the format ``pbkdf2:method:iterations``
to enable PBKDF2.
:param salt_length: the length of the salt in letters.
rr<00>$)rr3)rrr6r<00>h<> actual_methods r <00>generate_password_hashr;<sR<00><00>6%+<2B>g<EFBFBD>$5<>$5<>8<EFBFBD>K<EFBFBD> <20> <20> <20>2<EFBFBD>D<EFBFBD>%<25>f<EFBFBD>d<EFBFBD>H<EFBFBD>=<3D>=<3D><14>A<EFBFBD>}<7D><1B> (<28> (<28>d<EFBFBD> (<28> (<28>Q<EFBFBD> (<28> (<28>(r <00>pwhashc<00><><00>|<00>d<01><00>dkrdS|<00>dd<02><00>\}}}tjt |||<01><00>d|<04><00>S)a<>Check a password against a given salted and hashed password value.
In order to support unsalted legacy passwords this method supports
plain text passwords, md5 and sha1 hashes (both salted and unsalted).
Returns `True` if the password matched, `False` otherwise.
:param pwhash: a hashed string like returned by
:func:`generate_password_hash`.
:param password: the plaintext password to compare against the hash.
r8r#Fr)<05>countr&r.<00>compare_digestr3)r<rrr<00>hashvals r <00>check_password_hashrA\s^<00><00><0E>|<7C>|<7C>C<EFBFBD><18><18>1<EFBFBD><1C><1C><14>u<EFBFBD>"<22>L<EFBFBD>L<EFBFBD><13>a<EFBFBD>0<>0<><19>F<EFBFBD>D<EFBFBD>'<27> <0F> <1E>~<7E>f<EFBFBD>d<EFBFBD>H<EFBFBD>E<>E<>a<EFBFBD>H<>'<27> R<> R<>Rr <00> directory<72> pathnamesc<00>P<00><03>|sd}|g}|D]<5D><><03>dkrtj<00><03><00><00>t<00>fd<03>tD<00><00><00><00>s:tj<00><00><03><00>s<1B>dks<15><03>d<05><00>rdS|<02><00><03><00><00><>tj |<02>S)a2Safely join zero or more untrusted path components to a base
directory to avoid escaping the base directory.
:param directory: The trusted base directory.
:param pathnames: The untrusted path components relative to the
base directory.
:return: A safe path, otherwise ``None``.
<20>.rc3<00> <00>K<00>|]}|<01>vV<00><00> dSrr)rr<00>filenames <20>r r
zsafe_join.<locals>.<genexpr><3E>s'<00><><00><00><00>8<>8<>C<EFBFBD><03>x<EFBFBD><0F>8<>8<>8<>8<>8<>8r z..z../N)
<EFBFBD> posixpath<74>normpath<74>anyr <00>os<6F>path<74>isabsr%<00>appendr)rBrC<00>partsrGs @r <00> safe_joinrPns<><00><><00> <15><18><18> <09> <16>K<EFBFBD>E<EFBFBD><1D> <1F> <1F><08> <13>r<EFBFBD>><3E>><3E> <20>)<29>(<28>3<>3<>H<EFBFBD> <10>8<>8<>8<>8<><<3C>8<>8<>8<> 8<> 8<> <18><11>w<EFBFBD>}<7D>}<7D>X<EFBFBD>&<26>&<26> <18><18>4<EFBFBD><1F><1F><17>"<22>"<22>5<EFBFBD>)<29>)<29> <20><18>4<EFBFBD>4<EFBFBD> <0A> <0C> <0C>X<EFBFBD><1E><1E><1E><1E> <14>><3E>5<EFBFBD> !<21>!r )r4r5)r+r.rKrHr<00>typing<6E>t<> TYPE_CHECKINGrr*<00>listrrL<00>altsepr <00>List<73>str<74>__annotations__r)r<00>Tupler3r;<00>boolrA<00>OptionalrPrr r <00><module>r\s<><00><01><0E><0E><0E><0E><0E> <0B> <0B> <0B> <0B> <09> <09> <09> <09><10><10><10><10><0E><0E><0E><0E><12><12><12><12><04>?<3F> <09><08> M<>
<EFBFBD>"<22><19> <20>D<EFBFBD>!<02>!<02><16>F<EFBFBD>B<EFBFBD>G<EFBFBD>N<EFBFBD>+<2B>!<02>!<02>!<02><02><02> <0C>a<EFBFBD>f<EFBFBD>S<EFBFBD>k<EFBFBD><02><02><02>
F<01>S<EFBFBD>F<01>S<EFBFBD>F<01>F<01>F<01>F<01>=<3D>3<EFBFBD>=<3D>c<EFBFBD>=<3D>S<EFBFBD>=<3D>Q<EFBFBD>W<EFBFBD>S<EFBFBD>#<23>X<EFBFBD>=N<>=<3D>=<3D>=<3D>=<3D>DFH<01>)<29>)<29><11>)<29><1E>)<29>?B<>)<29><08>)<29>)<29>)<29>)<29>@S<01><03>S<01>s<EFBFBD>S<01>t<EFBFBD>S<01>S<01>S<01>S<01>$"<22><13>"<22>#<23>"<22>!<21>*<2A>S<EFBFBD>/<2F>"<22>"<22>"<22>"<22>"<22>"r