Files
loustique-home/venv/lib/python3.11/site-packages/werkzeug/__pycache__/security.cpython-311.pyc

109 lines
9.3 KiB
Plaintext
Raw Normal View History

2026-03-21 10:53:02 +01:00
<EFBFBD>
<00><><EFBFBD>i<EFBFBD><00><01><00>UddlmZddlZddlZddlZddlZddlZdZdZe d<05>ej
ej fD<00><00><00><00>Z de d<dd d
d hd <0C>d D<00><00><00>d<0E>d D<00><00><00>d<0F>d<10>Zd&d<15>Zd'd<1A>Z d(d)d<1E>Zd*d!<21>Zd+d%<25>ZdS),<2C>)<01> annotationsN<73>>abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789i@Bc#<01>*K<00>|]}|<01>|dk<00>
|V<00><00>dS)N<>/<2F>)<02>.0<EFBFBD>seps <20>]/home/maxime/Documents/loustiques-home/venv/lib/python3.11/site-packages/werkzeug/security.py<70> <genexpr>r s3<00><00><00><00><02><02> <0F>#<23>/<2F>c<EFBFBD>S<EFBFBD>j<EFBFBD>j<EFBFBD>C<EFBFBD>j<EFBFBD>j<EFBFBD>j<EFBFBD>j<EFBFBD><02><02>z list[str]<5D> _os_alt_seps<70>AUX<55>CONzCONIN$zCONOUT$c#<01> K<00>|] }d|<01><00>V<00><00>
dS)<02>COMNr<00>r<00>cs r
r r <00>(<00><00><00><00>+<2B>+<2B>A<EFBFBD>i<EFBFBD>A<EFBFBD>i<EFBFBD>i<EFBFBD>+<2B>+<2B>+<2B>+<2B>+<2B>+r u123456789¹²³c#<01> K<00>|] }d|<01><00>V<00><00>
dS)<02>LPTNrrs r
r r rr <00>NUL<55>PRN<52>length<74>int<6E>return<72>strc<01><><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 at least 1.<2E>c3<01>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)rs r
<00>gen_saltr(sA<00><00> <0A><11>{<7B>{<7B><18>:<3A>;<3B>;<3B>;<3B> <0A>7<EFBFBD>7<EFBFBD>E<>E<>u<EFBFBD>V<EFBFBD>}<7D>}<7D>E<>E<>E<> E<> E<>Er <00>method<6F>salt<6C>password<72>tuple[str, str]c<01><><00>|<00>d<01><00>^}}|<01><00><00>}|<02><00><00>}|dkr<>|sd}d}d}n9 tt|<03><00>\}}}n#t$rt d<06><00>d<00>wxYwd|z|z|z} t j|||||| <09><08><00><00><00><00>d |<06>d|<07>d|<08><00>fS|d
kr<>t|<03><00>}
|
d kr
d } t} nI|
dkr|d } t} n3|
d kr|d } t|d<00><00>} nt d<0E><00><00>t j
| ||| <0C><00><00><00><00>d| <0B>d| <0C><00>fSt d|<00>d<11><03><00><00>)N<>:<3A>scrypti<00><00><00>z'scrypt' takes 3 arguments.<2E><>)r*<00>n<>r<>p<>maxmemzscrypt:<3A>pbkdf2r<00>sha256<35>z'pbkdf2' takes 2 arguments.zpbkdf2:zInvalid hash method 'z'.) <0B>split<69>encode<64>maprr%<00>hashlibr/<00>hex<65>len<65>DEFAULT_PBKDF2_ITERATIONS<4E> pbkdf2_hmac) r)r*r+<00>args<67>
salt_bytes<EFBFBD>password_bytesr3r4r5r6<00>len_args<67> hash_name<6D>
iterationss r
<00>_hash_internalrH$s<><00><00><1A>L<EFBFBD>L<EFBFBD><13>%<25>%<25>M<EFBFBD>F<EFBFBD>T<EFBFBD><15><1B><1B><1D><1D>J<EFBFBD><1D>_<EFBFBD>_<EFBFBD>&<26>&<26>N<EFBFBD> <0A><18><19><19><13> J<01><15>A<EFBFBD><11>A<EFBFBD><11>A<EFBFBD>A<EFBFBD> J<01><1D>c<EFBFBD>4<EFBFBD>.<2E>.<2E><07><01>1<EFBFBD>a<EFBFBD>a<EFBFBD><61><1D> J<01> J<01> J<01> <20>!><3E>?<3F>?<3F>T<EFBFBD>I<> J<01><><EFBFBD><EFBFBD><15>q<EFBFBD><17>1<EFBFBD><1B>q<EFBFBD><1F><06> <13>N<EFBFBD><1E>Z<EFBFBD>1<EFBFBD><01>Q<EFBFBD>v<EFBFBD> <0E> <0E> <0E><11>c<EFBFBD>e<EFBFBD>e<EFBFBD> !<21>a<EFBFBD> !<21> !<21>!<21> !<21> !<21>a<EFBFBD> !<21> !<21> 
<EFBFBD>
<EFBFBD>
<10>8<EFBFBD> <1B> <1B><16>t<EFBFBD>9<EFBFBD>9<EFBFBD><08> <13>q<EFBFBD>=<3D>=<3D> <20>I<EFBFBD>2<>J<EFBFBD>J<EFBFBD> <15><11>]<5D>]<5D><1C>Q<EFBFBD><07>I<EFBFBD>2<>J<EFBFBD>J<EFBFBD> <15><11>]<5D>]<5D><1C>Q<EFBFBD><07>I<EFBFBD><1C>T<EFBFBD>!<21>W<EFBFBD><1C><1C>J<EFBFBD>J<EFBFBD><1C>:<3A>;<3B>;<3B> ;<3B> <14> <1F><19>><3E>:<3A>z<EFBFBD> <0E> <0E><11>c<EFBFBD>e<EFBFBD>e<EFBFBD> .<2E>i<EFBFBD> .<2E> .<2E>*<2A> .<2E> .<2E> 
<EFBFBD>
<EFBFBD><19>;<3B><16>;<3B>;<3B>;<3B><<3C><<3C><s <00>A*<00>*Br/<00><00> salt_lengthc<01>\<00>t|<02><00>}t|||<00><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(rH)r+r)rJr*<00>h<> actual_methods r
<00>generate_password_hashrOTsD<00><00>D <14>K<EFBFBD> <20> <20>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>pwhash<73>boolc<01><><00> |<00>dd<02><00>\}}}n#t$rYdSwxYwtjt |||<01><00>d|<04><00>S)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.
rLr9Fr)r:r%<00>hmac<61>compare_digestrH)rPr+r)r*<00>hashvals r
<00>check_password_hashrV{sk<00><00><15> &<26> <0C> <0C>S<EFBFBD>!<21> 4<> 4<><1D><06><04>g<EFBFBD>g<EFBFBD><67> <15><15><15><15><14>u<EFBFBD>u<EFBFBD><15><><EFBFBD><EFBFBD> <10> <1E>~<7E>f<EFBFBD>d<EFBFBD>H<EFBFBD>E<>E<>a<EFBFBD>H<>'<27> R<> R<>Rs <00><00>
+<03>+<03> directory<72> untrusted<65>
str | Nonec<01><><00><03>|sd}|g}|D<03>s<01>tj<00><03><00><00>tj<00><00><03><00>s<><73><03>d<02><00>sw<73>dksq<73><03>d<04><00>s\t <00>fd<05>tD<00><00><00><00>s<tjdkr/t d<07><00><03> d<02><00>D<00><00><00><00>rdS|<02>
<00><03><00><00><>tj |<02>S) a<>Safely join zero or more untrusted path components to a trusted base
directory to avoid escaping the base directory.
The untrusted path is assumed to be from/for a URL, such as for serving
files. Therefore, it should only use the forward slash ``/`` path separator,
and will be joined using that separator. On Windows, the backslash ``\``
separator is not allowed.
:param directory: The trusted base directory.
:param untrusted: The untrusted path components relative to the
base directory.
:return: A safe path, otherwise ``None``.
.. versionchanged:: 3.1.6
Special device names in multi-segment paths are not allowed on Windows.
.. versionchanged:: 3.1.5
More special device names, regardless of extension or trailing spaces,
are not allowed on Windows.
.. versionchanged:: 3.1.4
Special device names are not allowed on Windows.
<20>.rz..z../c3<01> <00>K<00>|]}|<01>vV<00><00> dSr r)rr <00>parts <20>r
r zsafe_join.<locals>.<genexpr><3E>s'<00><><00><00><00>7<>7<>3<EFBFBD>3<EFBFBD>$<24>;<3B>7<>7<>7<>7<>7<>7r <00>ntc3<01><>K<00>|]J}|<01>d<00><00>d<00><00><00><00><00><00>tvV<00><00>KdS)r[rN)<04> partition<6F>strip<69>upper<65>_windows_device_files)rr5s r
r zsafe_join.<locals>.<genexpr><3E>se<00><00><00><00><12><12><19><16>K<EFBFBD>K<EFBFBD><03>$<24>$<24>Q<EFBFBD>'<27>-<2D>-<2D>/<2F>/<2F>5<>5<>7<>7<>;P<>P<><12><12><12><12><12>r N) <0C> posixpath<74>normpath<74>os<6F>path<74>isabs<62>
startswith<EFBFBD>anyr <00>namer:<00>appendr&)rWrX<00>partsr]s @r
<00> safe_joinrn<00>s'<00><><00>0 <15><18><18> <09> <16>K<EFBFBD>E<EFBFBD><19><1B><1B><04><13> <15> <14><18>!<21>$<24>'<27>'<27><04> <0F>G<EFBFBD>M<EFBFBD>M<EFBFBD>$<24> <1F> <1F> <18><14><EFBFBD><EFBFBD>s<EFBFBD>#<23>#<23> <18><14>t<EFBFBD>|<7C>|<7C><13><EFBFBD><EFBFBD>u<EFBFBD>%<25>%<25><1C><12>7<>7<>7<>7<>,<2C>7<>7<>7<>7<>7<><1C><13><07>4<EFBFBD><0F><0F><17><12><12>!<21>Z<EFBFBD>Z<EFBFBD><03>_<EFBFBD>_<EFBFBD><12><12><12><12><12> <20><18>4<EFBFBD>4<EFBFBD> <0A> <0C> <0C>T<EFBFBD><1A><1A><1A><1A> <14>><3E>5<EFBFBD> !<21>!r )rrrr)r)rr*rr+rrr,)r/rI)r+rr)rrJrrr)rPrr+rrrQ)rWrrXrrrY)<14>
__future__rr=rSrfrdr!r#r@<00>listr <00>altsepr <00>__annotations__rcr(rHrOrVrnrr r
<00><module>rss~<00><01>"<22>"<22>"<22>"<22>"<22>"<22>"<22><0E><0E><0E><0E> <0B> <0B> <0B> <0B> <09> <09> <09> <09><10><10><10><10><0E><0E><0E><0E> M<>
<EFBFBD>%<25><19><1E>$<24><02><02><16>F<EFBFBD>B<EFBFBD>I<EFBFBD>&<26><02><02><02><02><02> <0C><02><02><02><02>

<EFBFBD> <09> <0C> <0A> <02>
,<2C>+<2B>*<2A>+<2B>+<2B>+<2B> <02> ,<2C>+<2B>*<2A>+<2B>+<2B>+<2B> <02>
<EFBFBD> <02>
<EFBFBD> <02><15>F<01>F<01>F<01>F<01>-=<3D>-=<3D>-=<3D>-=<3D>b?A<01>$)<29>$)<29>$)<29>$)<29>$)<29>NS<01>S<01>S<01>S<01>,8"<22>8"<22>8"<22>8"<22>8"<22>8"r