
    ,x`iZ                    (   % S SK Jr  S SKrS SKrS SKrS SKrS SKrSrSr\	" S \R                  \R                  R                  4 5       5      rS\S'   SS	S
S1S S 5       kS S 5       kSiSirSS jrSS jr S       SS jjrSS jrSS jrg)    )annotationsN>abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789i@B c              #  >   #    U  H  oc  M  US:w  d  M  Uv   M     g 7f)N/ ).0seps     Z/home/webadmin/html/weedthought.com/venv/lib/python3.13/site-packages/werkzeug/security.py	<genexpr>r      s      +CC3#:CC+s   	z	list[str]_os_alt_sepsAUXCONzCONIN$zCONOUT$c              #  ,   #    U  H
  nS U 3v   M     g7f)COMNr   r   cs     r
   r   r           +*AA3i*   u   123456789¹²³c              #  ,   #    U  H
  nS U 3v   M     g7f)LPTNr   r   s     r
   r   r      r   r   NULPRNc                f    U S::  a  [        S5      eSR                  S [        U 5       5       5      $ )zAGenerate a random string of SALT_CHARS with specified ``length``.r   zSalt length must be at least 1. c              3  V   #    U  H  n[         R                  " [        5      v   M!     g 7fN)secretschoice
SALT_CHARS)r   _s     r
   r   gen_salt.<locals>.<genexpr>!   s     E}!7>>*--}s   '))
ValueErrorjoinrange)lengths    r
   gen_saltr&      s.    {:;;77EuV}EEE    c           	        U R                  S5      tpUR                  5       nUR                  5       nU S:X  a\  U(       d  SnSnSnO [        [        U5      u  pgnSU-  U-  U-  n	[
        R                  " XTXgXS9R                  5       S	U SU SU 34$ U S
:X  a~  [        U5      n
U
S:X  a	  Sn[        nO7U
S:X  a  US   n[        nO%U
S:X  a  US   n[        US   5      nO[	        S5      e[
        R                  " XXL5      R                  5       SU SU 34$ [	        SU  S35      e! [         a    [	        S5      S ef = f)N:scrypti         z'scrypt' takes 3 arguments.   )saltnrpmaxmemzscrypt:pbkdf2r   sha256   z'pbkdf2' takes 2 arguments.zpbkdf2:zInvalid hash method 'z'.)splitencodemapintr"   hashlibr*   hexlenDEFAULT_PBKDF2_ITERATIONSpbkdf2_hmac)methodr.   passwordargs
salt_bytespassword_bytesr/   r0   r1   r2   len_args	hash_name
iterationss                r
   _hash_internalrG   $   sv   LL%MFJ__&NAAAJc4.a q1qNN1QceaS!AaS!	
 	
 
8	t9q= I2J]QI2J]QIT!WJ:;; :cei[*.	
 	
 0;<<A  J !>?TIJs   D( (D?c                H    [        U5      n[        XU 5      u  pEU SU SU 3$ )a  Securely 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.
$)r&   rG   )r@   r?   salt_lengthr.   hactual_methods         r
   generate_password_hashrM   T   s5    D K D%fH=A_AdV1QC((r'   c                     U R                  SS5      u  p#n[        R                  " [	        X#U5      S   U5      $ ! [         a     gf = f)a  Securely 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.
rI   r5   Fr   )r6   r"   hmaccompare_digestrG   )pwhashr@   r?   r.   hashvals        r
   check_password_hashrS   {   sQ     &S! 4g ~fHEaH'RR  s   ; 
AAc                2  ^ U (       d  Sn U /nU H  mTS:w  a  [         R                  " T5      m[        U4S j[         5       5      (       d  [        R
                  S:X  a8  TR                  S5      S   R                  5       R                  5       [        ;   dV  [        R                  R                  T5      (       d2  TR                  S5      (       d  TS:X  d  TR                  S5      (       a    g	UR                  T5        M     [         R                  " U6 $ )
a  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.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.
.r   c              3  ,   >#    U  H	  oT;   v   M     g 7fr   r   )r   r	   filenames     r
   r   safe_join.<locals>.<genexpr>   s     8<Cx<s   ntr   r   z..z../N)	posixpathnormpathanyr   osname	partitionstripupper_windows_device_filespathisabs
startswithappendr#   )	directory	pathnamespartsrW   s      @r
   	safe_joinrj      s       	KEr> ))(3H 8<8884&&s+A.446<<>BWWww}}X&&""3''4""5))X% ( >>5!!r'   )r%   r9   returnstr)r?   rl   r.   rl   r@   rl   rk   ztuple[str, str])r*      )r@   rl   r?   rl   rJ   r9   rk   rl   )rQ   rl   r@   rl   rk   bool)rg   rl   rh   rl   rk   z
str | None)
__future__r   r:   rO   r]   rZ   r   r   r=   listr	   rc   altsepr   __annotations__rb   r&   rG   rM   rS   rj   r   r'   r
   <module>rs      s    "   	  M
%  FFBGGNN+ i 
 
			
 ,*+	 ,*+	 
	 
	 F-=b ?A$)$)$)8;$)$)NS,+"r'   