Files
proxmox/venv/lib/python3.12/site-packages/werkzeug/__pycache__/security.cpython-312.pyc

89 lines
7.7 KiB
Plaintext
Raw Normal View History

<EFBFBD>
<0A>HiH<00><01>,<00>UddlmZddlZddlZddlZddlZddlZdZdZe d<05>ejejjfD<00><00>Z ded<dd d
d hd <0C>ed <0A>D<00><00>d<0E>ed <0A>D<00><00>Zdd<0F>Zdd<10>Z d dd<11>Zdd<12>Zdd<13>Zy)<1A>)<01> annotationsN<73>>abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789i@Bc#<01>2K<00>|]}|<01><01>|dk7s<01> |<01><01><00>y<00>w)N<>/<2F>)<02>.0<EFBFBD>seps <20>S/home/intlc/projects/proxmox/venv/lib/python3.12/site-packages/werkzeug/security.py<70> <genexpr>r s<00><00><><00><02> <0F>s<EFBFBD><EFBFBD>3<EFBFBD>#<23>:<3A>C<EFBFBD><02>s <00><01><01>z list[str]<5D> _os_alt_seps<70>CON<4F>PRN<52>AUX<55>NULc#<01>&K<00>|] }d|<01><00><02><01><00> y<01>w)<02>COMNr<00>r<00>is r
r r <00><00><00><><00>#<23>A<EFBFBD><03>A<EFBFBD>3<EFBFBD>i<EFBFBD>#<23><><00><01>
c#<01>&K<00>|] }d|<01><00><02><01><00> y<01>w)<02>LPTNrrs r
r r rrc<01>d<00>|dkr td<02><00>djd<04>t|<00>D<00><00>S)zAGenerate a random string of SALT_CHARS with specified ``length``.rzSalt length must be at least 1.<2E>c3<01>NK<00>|]}tjt<00><00><01><00>y<00>w<01>N)<03>secrets<74>choice<63>
SALT_CHARS)r<00>_s r
r zgen_salt.<locals>.<genexpr>s<00><00><><00>E<>!<21>7<EFBFBD>><3E>><3E>*<2A>-<2D>E<>s<00>#%)<03>
ValueError<EFBFBD>join<69>range)<01>lengths r
<00>gen_saltr&s.<00><00> <0A><11>{<7B><18>:<3A>;<3B>;<3B> <0A>7<EFBFBD>7<EFBFBD>E<>u<EFBFBD>V<EFBFBD>}<7D>E<> E<>E<>c<01>~<00>|jd<01>^}}|j<00>}|j<00>}|dk(r]|sd}d}d}n tt|<03>\}}}d|z|z|z} t j |||||| <09><08>j<00>d |<06>d|<07>d|<08><00>fS|d
k(r|t|<03>}
|
d k(r d } t} n5|
dk(r |d } t} n$|
d k(r|d } t|d<00>} n t d<0E><00>t j| ||| <0C>j<00>d| <0B>d| <0C><00>fSt d|<00>d<11><03><00>#t$r t d<06>d<00>wxYw)N<>:<3A>scrypti<00><00><00>z'scrypt' takes 3 arguments.<2E><>)<05>salt<6C>n<>r<>p<>maxmemzscrypt:<3A>pbkdf2r<00>sha256<35>z'pbkdf2' takes 2 arguments.zpbkdf2:zInvalid hash method 'z'.) <0B>split<69>encode<64>map<61>intr"<00>hashlibr*<00>hex<65>len<65>DEFAULT_PBKDF2_ITERATIONS<4E> pbkdf2_hmac) <0A>methodr.<00>password<72>args<67>
salt_bytes<EFBFBD>password_bytesr/r0r1r2<00>len_args<67> hash_name<6D>
iterationss r
<00>_hash_internalrG!s<><00><00><1A>L<EFBFBD>L<EFBFBD><13>%<25>M<EFBFBD>F<EFBFBD>T<EFBFBD><15><1B><1B><1D>J<EFBFBD><1D>_<EFBFBD>_<EFBFBD>&<26>N<EFBFBD> <0A><18><19><13><15>A<EFBFBD><11>A<EFBFBD><11>A<EFBFBD> J<01><1D>c<EFBFBD>4<EFBFBD>.<2E><07><01>1<EFBFBD>a<EFBFBD><15>q<EFBFBD><17>1<EFBFBD><1B>q<EFBFBD><1F><06> <13>N<EFBFBD>N<EFBFBD><1E>Z<EFBFBD>1<EFBFBD><01>Q<EFBFBD>v<EFBFBD> <0E><11>c<EFBFBD>e<EFBFBD><15>a<EFBFBD>S<EFBFBD><01>!<21><13>A<EFBFBD>a<EFBFBD>S<EFBFBD> !<21> 
<EFBFBD>
<EFBFBD>
<10>8<EFBFBD> <1B><16>t<EFBFBD>9<EFBFBD><08> <13>q<EFBFBD>=<3D> <20>I<EFBFBD>2<>J<EFBFBD> <15><11>]<5D><1C>Q<EFBFBD><07>I<EFBFBD>2<>J<EFBFBD> <15><11>]<5D><1C>Q<EFBFBD><07>I<EFBFBD><1C>T<EFBFBD>!<21>W<EFBFBD><1C>J<EFBFBD><1C>:<3A>;<3B> ;<3B> <14> <1F> <1F><19>><3E>:<3A>z<EFBFBD> <0E><11>c<EFBFBD>e<EFBFBD><15>i<EFBFBD>[<5B><01>*<2A><1C> .<2E> 
<EFBFBD>
<EFBFBD><19>0<><16><08><02>;<3B><<3C><<3C><>A<1E> J<01> <20>!><3E>?<3F>T<EFBFBD>I<> J<01>s <00>D&<00>&D<c<01>L<00>t|<02>}t|||<00>\}}|<05>d|<03>d|<04><00>S)aDSecurely hash a password for storage. A password can be compared to a stored hash
using :func:`check_password_hash`.
The following methods are supported:
- ``scrypt``, the default. The parameters are ``n``, ``r``, and ``p``, the default
is ``scrypt:32768:8:1``. See :func:`hashlib.scrypt`.
- ``pbkdf2``, less secure. The parameters are ``hash_method`` and ``iterations``,
the default is ``pbkdf2:sha256:600000``. See :func:`hashlib.pbkdf2_hmac`.
Default parameters may be updated to reflect current guidelines, and methods may be
deprecated and removed if they are no longer considered secure. To migrate old
hashes, you may generate a new hash when checking an old hash, or you may contact
users with a link to reset their password.
:param password: The plaintext password.
:param method: The key derivation function and parameters.
:param salt_length: The number of characters to generate for the salt.
.. versionchanged:: 3.1
The default iterations for pbkdf2 was increased to 1,000,000.
.. versionchanged:: 2.3
Scrypt support was added.
.. versionchanged:: 2.3
The default iterations for pbkdf2 was increased to 600,000.
.. versionchanged:: 2.3
All plain hashes are deprecated and will not be supported in Werkzeug 3.0.
<20>$)r&rG)r@r?<00> salt_lengthr.<00>h<> actual_methods r
<00>generate_password_hashrMQs9<00><00>D <14>K<EFBFBD> <20>D<EFBFBD>%<25>f<EFBFBD>d<EFBFBD>H<EFBFBD>=<3D><14>A<EFBFBD>}<7D><1B>_<EFBFBD>A<EFBFBD>d<EFBFBD>V<EFBFBD>1<EFBFBD>Q<EFBFBD>C<EFBFBD> (<28>(r'c<01><><00> |jdd<02>\}}}tjt |||<01>d|<04>S#t$rYywxYw)aASecurely check that the given stored password hash, previously generated using
:func:`generate_password_hash`, matches the given password.
Methods may be deprecated and removed if they are no longer considered secure. To
migrate old hashes, you may generate a new hash when checking an old hash, or you
may contact users with a link to reset their password.
:param pwhash: The hashed password.
:param password: The plaintext password.
.. versionchanged:: 2.3
All plain hashes are deprecated and will not be supported in Werkzeug 3.0.
rIr5Fr)r6r"<00>hmac<61>compare_digestrG)<05>pwhashr@r?r.<00>hashvals r
<00>check_password_hashrSxsU<00><00><15> &<26> <0C> <0C>S<EFBFBD>!<21> 4<><1D><06><04>g<EFBFBD> <10> <1E> <1E>~<7E>f<EFBFBD>d<EFBFBD>H<EFBFBD>E<>a<EFBFBD>H<>'<27> R<>R<><52> <16><15><14><15>s<00><<00> A<03>Ac<01><><00><03>|sd}|g}|D]<5D><00><03>dk7rtj<00><03><00>t<00>fd<03>tD<00><00>s<>tj
dk(r6tj j<00><03>dj<00>tvsFtj j<00><03>s'<27>jd<06>s<16>dk(s<11>jd<08>ry |j<00><03><00><>tj|<02>S)
a<EFBFBD>Safely 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``.
.. versionchanged:: 3.1.4
Special device names are disallowed on Windows.
<20>.rc3<01>&<00>K<00>|]}|<01>v<00><01><00>
y<00>wrr)rr <00>filenames <20>r
r zsafe_join.<locals>.<genexpr><3E>s<00><><00><><00>8<>C<EFBFBD><03>x<EFBFBD><0F>8<>s<00><01>ntrrz..z../N)<0E> posixpath<74>normpath<74>anyr <00>os<6F>name<6D>path<74>splitext<78>upper<65>_windows_device_files<65>isabs<62>
startswith<EFBFBD>appendr#)<04> directory<72> pathnames<65>partsrWs @r
<00> safe_joinrh<00>s<><00><><00> <15><18> <09> <16>K<EFBFBD>E<EFBFBD><1D><1F><08> <13>r<EFBFBD>><3E> <20>)<29>)<29>(<28>3<>H<EFBFBD> <10>8<><<3C>8<> 8<><12><07><07>4<EFBFBD><0F><16>G<EFBFBD>G<EFBFBD>$<24>$<24>X<EFBFBD>.<2E>q<EFBFBD>1<>7<>7<>9<>=R<>R<><11>w<EFBFBD>w<EFBFBD>}<7D>}<7D>X<EFBFBD>&<26><17>"<22>"<22>3<EFBFBD>'<27><17>4<EFBFBD><1F><17>"<22>"<22>5<EFBFBD>)<29><17> <0A> <0C> <0C>X<EFBFBD><1E>%<1F>( <15>><3E>><3E>5<EFBFBD> !<21>!r')r%r9<00>return<72>str)r?rjr.rjr@rjriztuple[str, str])r*<00>)r@rjr?rjrJr9rirj)rQrjr@rjri<00>bool)rerjrfrjriz
str | None)<16>
__future__rr:rOr\rYrr r=<00>listr r^<00>altsepr <00>__annotations__r$rar&rGrMrSrhrr'r
<00><module>rqs<><00><01>"<22><0E> <0B> <09><10><0E> M<>
<EFBFBD>%<25><19><1E><02><16>F<EFBFBD>F<EFBFBD>B<EFBFBD>G<EFBFBD>G<EFBFBD>N<EFBFBD>N<EFBFBD>+<2B><02><02> <0C>i<EFBFBD><02>
<EFBFBD> <09> <09> <09> <02>
$<24><15>r<EFBFBD><19>#<23> <02> $<24><15>r<EFBFBD><19>#<23> <02><15>F<01>-=<3D>b?A<01>$)<29><11>$)<29><1E>$)<29>8;<3B>$)<29><08>$)<29>NS<01>,'"r'