Ë
    ÑÕ°jþ  ã                  ó  — U d dl mZ d dlZd dlZd dlZd dlZd dlZdZdZ e	d„ ej                  ej                  fD «       «      Zded<   dd	d
dhd„ dD «       £d„ dD «       £d’d’Zdd„Zdd„Z	 d	 	 	 	 	 	 	 dd„Zdd„Zdd„Zy)é    )ÚannotationsNÚ>abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789i@B c              #  ó2   K  — | ]  }|€Œ|dk7  sŒ|–— Œ y ­w)Nú/© )Ú.0Úseps     úG/var/www/mission/venv/lib/python3.12/site-packages/werkzeug/security.pyú	<genexpr>r      s   è ø€ ò Ø¨#©/¸cÀS»j„Cñùs   ‚Š�z	list[str]Ú_os_alt_sepsÚAUXÚCONzCONIN$zCONOUT$c              #  ó&   K  — | ]	  }d |› �–— Œ y­w)ÚCOMNr   ©r   Úcs     r
   r   r      ó   è ø€ Ò+�AˆˆAˆ3„iÑ+ùó   ‚u   123456789Â¹Â²Â³c              #  ó&   K  — | ]	  }d |› �–— Œ y­w)ÚLPTNr   r   s     r
   r   r      r   r   ÚNULÚPRNc                ód   — | dk  rt        d«      ‚dj                  d„ t        | «      D «       «      S )zAGenerate a random string of SALT_CHARS with specified ``length``.r   zSalt length must be at least 1.Ú c              3  óN   K  — | ]  }t        j                  t        «      –— Œ y ­w©N)ÚsecretsÚchoiceÚ
SALT_CHARS)r   Ú_s     r
   r   zgen_salt.<locals>.<genexpr>!   s   è ø€ ÒE°!”7—>‘>¤*×-ÑEùs   ‚#%)Ú
ValueErrorÚjoinÚrange)Úlengths    r
   Úgen_saltr%      s.   € à�‚{ÜÐ:Ó;Ð;à�7‰7ÑE´u¸V³}ÔEÓEÐEó    c                ó~  — | j                  d«      ^} }|j                  «       }|j                  «       }| dk(  r]|sd}d}d}n	 t        t        |«      \  }}}d|z  |z  |z  }	t        j                  ||||||	¬«      j                  «       d	|› d|› d|› �fS | d
k(  r|t        |«      }
|
dk(  r	d}t        }n5|
dk(  r|d   }t        }n$|
dk(  r|d   }t        |d   «      }nt	        d«      ‚t        j                  ||||«      j                  «       d|› d|› �fS t	        d| › d�«      ‚# t        $ r t	        d«      d ‚w xY w)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/   r0   r1   Úlen_argsÚ	hash_nameÚ
iterationss                r
   Ú_hash_internalrF   $   s„  € Ø—L‘L Ó%€M€FˆTØ—‘“€JØ—_‘_Ó&€Nà�ÒÙØˆAØˆAØ‰AðJÜœc 4›.‘��1�að �q‘˜1‘˜q‘ˆä�N‰NØ Z°1¸¸QÀvôç‰c‹eØ�a�S˜˜!˜˜A˜a˜SÐ!ð	
ð 	
ð 
�8Ò	Ü�t“9ˆà�qŠ=Ø ˆIÜ2‰JØ˜Š]Ø˜Q™ˆIÜ2‰JØ˜Š]Ø˜Q™ˆIÜ˜T !™W›‰JäÐ:Ó;Ð;ô ×ÑØ˜>¨:°zóç‰c‹eØ�i�[  * Ð.ð	
ð 	
ô Ð0°°¸Ð;Ó<Ð<øôA ò JÜ Ð!>Ó?ÀTÐIðJús   ÁD& Ä&D<c                óL   — t        |«      }t        ||| «      \  }}|› d|› d|› �S )aD  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%   rF   )r?   r>   Úsalt_lengthr-   ÚhÚactual_methods         r
   Úgenerate_password_hashrL   T   s9   € ôD �KÓ €DÜ% f¨d°HÓ=Ñ€A€}Øˆ_˜A˜d˜V 1 Q CÐ(Ð(r&   c                ó–   — 	 | j                  dd«      \  }}}t        j                  t	        |||«      d   |«      S # t        $ r Y yw xY w)aA  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.
    rH   r4   Fr   )r5   r!   ÚhmacÚcompare_digestrF   )Úpwhashr?   r>   r-   Úhashvals        r
   Úcheck_password_hashrR   {   sU   € ðØ &§¡¨S°!Ó 4Ñˆ��gô ×Ñœ~¨f°d¸HÓEÀaÑHÈ'ÓRÐRøô ò Ùðús   ‚< ¼	AÁAc                ó¾  ‡— | sd} | g}|D ]¿  Š‰sŒt        j                  ‰«      Št        j                  j	                  ‰«      ss‰j                  d«      sb‰dk(  s]‰j                  d«      sLt        ˆfd„t        D «       «      s4t        j                  dk(  r#t        d„ ‰j                  d«      D «       «      r y|j                  ‰«       ŒÁ t        j                  |Ž 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.
    ú.r   z..z../c              3  ó&   •K  — | ]  }|‰v –— Œ
 y ­wr   r   )r   r	   Úparts     €r
   r   zsafe_join.<locals>.<genexpr>¼   s   øè ø€ Ò7 3�3˜$”;Ñ7ùs   ƒÚntc              3  óˆ   K  — | ]:  }|j                  d «      d   j                  «       j                  «       t        v –— Œ< y­w)rT   r   N)Ú	partitionÚstripÚupperÚ_windows_device_files)r   r0   s     r
   r   zsafe_join.<locals>.<genexpr>¿   s>   è ø€ ò àð —K‘K Ó$ QÑ'×-Ñ-Ó/×5Ñ5Ó7Ô;PÔPñùs   ‚A AN)Ú	posixpathÚnormpathÚosÚpathÚisabsÚ
startswithÚanyr   Únamer5   Úappendr"   )Ú	directoryÚ	untrustedÚpartsrV   s      @r
   Ú	safe_joinri   ‘   sÄ   ø€ ñ0 ð ˆ	àˆK€Eàò ˆÙØä×!Ñ! $Ó'ˆô �G‰G�M‰M˜$Ôà�‰˜sÔ#Ø�tŠ|Ø�‰˜uÔ%ÜÓ7¬,Ô7Ô7ä—‘˜4’Üñ à!ŸZ™Z¨›_ôô ñ à�‰�TÕð/ô2 �>‰>˜5Ð!Ð!r&   )r$   r8   ÚreturnÚstr)r>   rk   r-   rk   r?   rk   rj   ztuple[str, str])r)   é   )r?   rk   r>   rk   rI   r8   rj   rk   )rP   rk   r?   rk   rj   Úbool)rf   rk   rg   rk   rj   z
str | None)Ú
__future__r   r9   rN   r_   r]   r   r   r<   Úlistr	   Úaltsepr   Ú__annotations__r\   r%   rF   rL   rR   ri   r   r&   r
   ú<module>rr      sÚ   ðÞ "ã Û Û 	Û Û àM€
Ø%Ð áñ Ø—F‘F˜BŸI™IÐ&ôó €ˆió ð
 
Ø	ØØð		ñ
 ,Ð*Ô+ð	ñ ,Ð*Ô+ð	ð 
ð	ð 
ð	Ð óFó-=ðb ?Að$)Øð$)Øð$)Ø8;ð$)àó$)óNSô,8"r&   