§
    «! hÍ  ã                  óÆ   — 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        j        fD ¦   «         ¦  «        Zded<   dd„Zdd„Z	 dd d„Zd!d„Zd"d„ZdS )#é    )ÚannotationsNÚ>abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789i@B c              #  ó*   K  — | ]}|®|dk    ¯
|V — Œd S )Nú/© )Ú.0Úseps     úKc:\xampp_lite_8_4\www\timesheet\venv\Lib\site-packages\werkzeug/security.pyú	<genexpr>r      s3   è è € ð ð Ø¨s¨À3È#Â:À:€CÀ:À:À:À:ðð ó    z	list[str]Ú_os_alt_sepsÚlengthÚintÚreturnÚstrc                ó„   — | dk    rt          d¦  «        ‚d                     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  óH   K  — | ]}t          j        t          ¦  «        V — Œd S ©N)ÚsecretsÚchoiceÚ
SALT_CHARS)r   Ú_s     r
   r   zgen_salt.<locals>.<genexpr>   s,   è è € ÐEÐE°!•7”>¥*Ñ-Ô-ÐEÐEÐEÐEÐEÐEr   )Ú
ValueErrorÚjoinÚrange)r   s    r
   Úgen_saltr      sA   € à�‚{€{ÝÐ:Ñ;Ô;Ð;à�7Š7ÐEÐEµu¸V±}´}ÐEÑEÔEÑEÔEÐEr   ÚmethodÚsaltÚpasswordútuple[str, str]c                óø  — |                       d¦  «        ^} }|                     ¦   «         }|                     ¦   «         }| dk    r„|sd}d}d}n9	 t          t          |¦  «        \  }}}n# t          $ r t	          d¦  «        d ‚w xY wd|z  |z  |z  }	t          j        ||||||	¬¦  «                             ¦   «         d	|› d|› d|› �fS | d
k    r™t          |¦  «        }
|
dk    r
d}t          }nI|
dk    r|d         }t          }n3|
dk    r|d         }t          |d         ¦  «        }nt	          d¦  «        ‚t          j
        ||||¦  «                             ¦   «         d|› d|› �fS t	          d| › d�¦  «        ‚)Nú:Úscrypti €  é   é   z'scrypt' takes 3 arguments.é„   )r   ÚnÚrÚpÚmaxmemzscrypt:Úpbkdf2r   Úsha256é   z'pbkdf2' takes 2 arguments.zpbkdf2:zInvalid hash method 'z'.)ÚsplitÚencodeÚmapr   r   Úhashlibr$   ÚhexÚlenÚDEFAULT_PBKDF2_ITERATIONSÚpbkdf2_hmac)r   r   r    ÚargsÚ
salt_bytesÚpassword_bytesr(   r)   r*   r+   Úlen_argsÚ	hash_nameÚ
iterationss                r
   Ú_hash_internalr=      sÚ  € Ø—L’L Ñ%Ô%€M€FˆTØ—’‘”€JØ—_’_Ñ&Ô&€Nà�ÒÐØð 	JØˆAØˆAØˆAˆAðJÝ�c 4™.œ.‘��1�a�aøÝð Jð Jð JÝ Ð!>Ñ?Ô?ÀTÐIðJøøøð �q‘˜1‘˜q‘ˆåŒNØ Z°1¸¸QÀvðñ ô çŠc‰eŒeØ!�aÐ!Ð!˜!Ð!Ð!˜aÐ!Ð!ð	
ð 	
ð 
�8Ò	Ð	Ý�t‘9”9ˆà�qŠ=ˆ=Ø ˆIÝ2ˆJˆJØ˜Š]ˆ]Ø˜QœˆIÝ2ˆJˆJØ˜Š]ˆ]Ø˜QœˆIÝ˜T !œW™œˆJˆJåÐ:Ñ;Ô;Ð;õ ÔØ˜>¨:°zñô çŠc‰eŒeØ.�iÐ.Ð. *Ð.Ð.ð	
ð 	
õ Ð;°Ð;Ð;Ð;Ñ<Ô<Ð<s   ÁA* Á*Br$   é   Úsalt_lengthc                ó\   — 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   r=   )r    r   r?   r   ÚhÚactual_methods         r
   Úgenerate_password_hashrD   I   sD   € õD �KÑ Ô €DÝ% f¨d°HÑ=Ô=Ñ€A€}ØÐ(Ð(˜dÐ(Ð( QÐ(Ð(Ð(r   ÚpwhashÚboolc                ó°   — 	 |                       dd¦  «        \  }}}n# t          $ r Y dS w xY wt          j        t	          |||¦  «        d         |¦  «        S )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.
    rA   r.   Fr   )r/   r   ÚhmacÚcompare_digestr=   )rE   r    r   r   Úhashvals        r
   Úcheck_password_hashrK   p   sk   € ðØ &§¢¨S°!Ñ 4Ô 4Ñˆ��g�gøÝð ð ð Øˆuˆuðøøøõ Ô�~¨f°d¸HÑEÔEÀaÔHÈ'ÑRÔRÐRs   ‚ �
+ª+Ú	directoryÚ	pathnamesú
str | Nonec                óz  ‡— | sd} | g}|D ]£Š‰dk    rt          j        ‰¦  «        Št          ˆfd„t          D ¦   «         ¦  «        sOt          j                             ‰¦  «        s0‰                     d¦  «        s‰dk    s‰                     d¦  «        r dS |                     ‰¦  «         Œ¤t          j	        |Ž S )a2  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  ó    •K  — | ]}|‰v V — Œ	d S r   r   )r   r	   Úfilenames     €r
   r   zsafe_join.<locals>.<genexpr>›   s'   øè è € Ð8Ð8 C��x�Ð8Ð8Ð8Ð8Ð8Ð8r   r   z..z../N)
Ú	posixpathÚnormpathÚanyr   ÚosÚpathÚisabsÚ
startswithÚappendr   )rL   rM   ÚpartsrR   s      @r
   Ú	safe_joinr\   †   sæ   ø€ ð ð ð ˆ	àˆK€Eàð ð ˆØ�rŠ>ˆ>Ý Ô)¨(Ñ3Ô3ˆHõ Ð8Ð8Ð8Ð8­<Ð8Ñ8Ô8Ñ8Ô8ð	åŒw�}Š}˜XÑ&Ô&ð	ð ×"Ò" 3Ñ'Ô'ð		ð
 ˜4ÒÐØ×"Ò" 5Ñ)Ô)ð  ð �4�4à�Š�XÑÔÐÐåŒ>˜5Ð!Ð!r   )r   r   r   r   )r   r   r   r   r    r   r   r!   )r$   r>   )r    r   r   r   r?   r   r   r   )rE   r   r    r   r   rF   )rL   r   rM   r   r   rN   )Ú
__future__r   r2   rH   rV   rS   r   r   r5   Úlistr	   rW   Úaltsepr   Ú__annotations__r   r=   rD   rK   r\   r   r   r
   ú<module>ra      s$  ðØ "Ð "Ð "Ð "Ð "Ð "Ð "à €€€Ø €€€Ø 	€	€	€	Ø Ð Ð Ð Ø €€€àM€
Ø%Ð à˜$ð ð Ø”F˜BœGœNÐ+ðñ ô ñ ô €ð ð ð ñ ð
Fð Fð Fð Fð-=ð -=ð -=ð -=ðb ?Að$)ð $)ð $)ð $)ð $)ðNSð Sð Sð Sð, "ð  "ð  "ð  "ð  "ð  "r   