+
    Nj                      a  0 t $ ^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RItRtRt	]
! R ]P                  ]P                  3 4       4      tR]R&   0 RmR R	 4       mR
 R	 4       mRkRktR R ltR R ltRR R lltR R ltR R ltR# )    )annotationsN>abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789i@B c              #  B   "   T F  qf   K  VR8w  g   K  Vx  K  	  R # 5i)N/ ).0seps   & S/data/cameron/venvs/serve_omidlab/lib/python3.14/site-packages/werkzeug/security.py	<genexpr>r      s      &CCcSjCC&s   
z	list[str]_os_alt_sepsc              #  ,   "   T F
  pR V 2x  K  	  R# 5i)COMNr   r   cs   & r
   r   r           +*AA3i*   u   123456789¹²³c              #  ,   "   T F
  pR V 2x  K  	  R# 5i)LPTNr   r   s   & r
   r   r      r   r   NULPRNc                    V ^8  d   QhRRRR/# )   lengthintreturnstrr   )formats   "r
   __annotate__r      s     F FS FS F    c                h    V ^ 8:  d   \        R4      hRP                  R \        V 4       4       4      # )zAGenerate a random string of SALT_CHARS with specified ``length``.zSalt length must be at least 1. c              3  V   "   T F  p\         P                  ! \        4      x  K!  	  R # 5iN)secretschoice
SALT_CHARS)r   _s   & r
   r   gen_salt.<locals>.<genexpr>!   s     E}!7>>*--}s   '))
ValueErrorjoinrange)r   s   &r
   gen_saltr,      s.    {:;;77EuV}EEEr   c               (    V ^8  d   QhRRRRRRRR/# )r   methodr   saltpasswordr   ztuple[str, str]r   )r   s   "r
   r   r   $   s(     -= -=3 -=c -=S -=_ -=r   c           	        V P                  R 4      vrVP                  4       pVP                  4       pV R8X  dm   V'       g   Rp^p^pM \        \        V4      w  rgp^V,          V,          V,          p	\
        P                  ! WTWgWR7      P                  4       RV R V R V 23# V R8X  d   \        V4      p
V
^ 8X  d
   Rp\        pMEV
^8X  d   V^ ,          p\        pM.V
^8X  d   V^ ,          p\        V^,          4      pM\	        R4      h\
        P                  ! WWL4      P                  4       R	V R V 23# \	        R
V  R24      h  \         d    \	        R4      Rhi ; i):scryptz'scrypt' takes 3 arguments.N)r/   nrpmaxmemzscrypt:pbkdf2sha256z'pbkdf2' takes 2 arguments.zpbkdf2:zInvalid hash method 'z'.i   )splitencodemapr   r)   hashlibr3   hexlenDEFAULT_PBKDF2_ITERATIONSpbkdf2_hmac)r.   r/   r0   args
salt_bytespassword_bytesr4   r5   r6   r7   len_args	hash_name
iterationss   &&&          r
   _hash_internalrH   $   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   
E	 	E!c               (    V ^8  d   QhRRRRRRRR/# )r   r0   r   r.   salt_lengthr   r   r   )r   s   "r
   r   r   T   s,     $) $)$)$)8;$)$)r   c                H    \        V4      p\        WV 4      w  rEV RV RV 2# )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,   rH   )r0   r.   rJ   r/   hactual_methods   &&&   r
   generate_password_hashrO   T   s5    D K D%fH=A_AdV1QC((r   c               $    V ^8  d   QhRRRRRR/# )r   pwhashr   r0   r   boolr   )r   s   "r
   r   r   {   s&     S S Ss St Sr   c                     V P                  R^4      w  r#p\        P                  ! \	        Y#T4      ^ ,          T4      #   \         d     R# i ; i)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.
rL   F)r:   r)   hmaccompare_digestrH   )rQ   r0   r.   r/   hashvals   &&   r
   check_password_hashrW   {   sQ     &S! 4g ~fHEaH'RR  s   ? AAc               $    V ^8  d   QhRRRRRR/# )r   	directoryr   	untrustedr   z
str | Noner   )r   s   "r
   r   r      s!     8" 8" 8"# 8"* 8"r   c                  a V '       g   Rp V .pV EFG  oS'       g   K  \         P                  ! S4      o\        P                  P	                  S4      '       g   SP                  R4      '       g   SR8X  g   SP                  R4      '       g   \        ;QJ d#    V3R l\         4       F  '       g   K   RM	  RM! V3R l\         4       4      '       gn   \        P                  R8X  d\   \        ;QJ d+    R	 SP                  R4       4       F  '       g   K   RM 	  RM! R	 SP                  R4       4       4      '       d    R
# VP                  S4       EKJ  	  \         P                  ! V!  # )aX  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.
.r   z..z../c              3  ,   <"   T F	  qS9   x  K  	  R # 5ir#   r   )r   r	   parts   & r
   r   safe_join.<locals>.<genexpr>   s     7,3$;,s   TFntc              3     "   T F@  pVP                  R 4      ^ ,          P                  4       P                  4       \        9   x  KB  	  R# 5i)r\   N)	partitionstripupper_windows_device_files)r   r6   s   & r
   r   r_      s=      , KK$Q'--/557;PP,s   AA
N)	posixpathnormpathospathisabs
startswithanyr   namer:   appendr*   )rY   rZ   partsr^   s   &* @r
   	safe_joinrp      s    0  	KE!!$' GGMM$s##t|u%%s7,7sss7,7774C !ZZ_CCC !ZZ_   T/ 2 >>5!!r   >   AUXCONCONIN$CONOUT$)r3      )__conditional_annotations__
__future__r   r=   rT   rh   rf   r$   r&   r@   listr	   altsepr   __annotations__re   r,   rH   rO   rW   rp   )rv   s   @r
   <module>r{      s    " "   	  M
%  FFBII& i 	
 ,*+	 ,*+	 
	 
	 F-=`$)NS,8"r   