
    %h                        % 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 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     I/var/www/auris/envauris/lib/python3.13/site-packages/werkzeug/security.py	<genexpr>r      s      +CC3#:CC+s   	z	list[str]_os_alt_sepsc                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#   r$   r%   r&   len_args	hash_name
iterationss                r
   _hash_internalr;      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   r;   )r4   r3   salt_lengthr"   hactual_methods         r
   generate_password_hashrA   I   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.
r=   r)   Fr   )r*   r   hmaccompare_digestr;   )pwhashr4   r3   r"   hashvals        r
   check_password_hashrG   p   sQ     &S! 4g ~fHEaH'RR  s   ; 
AAc                  ^ U (       d  Sn U /nU H  mTS:w  a  [         R                  " T5      m[        U4S j[         5       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``.
.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   r   z..z../N)
	posixpathnormpathanyr   ospathisabs
startswithappendr   )	directory	pathnamespartsrK   s      @r
   	safe_joinrX      s      	KEr> ))(3H 8<888ww}}X&&""3''4""5))X   >>5!!r   )r   r-   returnstr)r3   rZ   r"   rZ   r4   rZ   rY   ztuple[str, str])r      )r4   rZ   r3   rZ   r>   r-   rY   rZ   )rE   rZ   r4   rZ   rY   bool)rU   rZ   rV   rZ   rY   z
str | None)
__future__r   r.   rC   rP   rM   r   r   r1   listr	   rQ   altsepr   __annotations__r   r;   rA   rG   rX   r   r   r
   <module>ra      s    "   	  M
%  FFBGGNN+ i 
F-=b ?A$)$)$)8;$)$)NS, "r   