§
    HŠtj­§  ã                   óf  — d Z ddlmZ ddlmZmZmZ ddlm	Z	m
Z
 	 ddlmZ ddlmZ n# e$ r ddlmZ ddlmZ Y nw xY wddlmZ ddlmZ dd	lZdd	lZdd	lZ ej        e¦  «        Zdd	lZdd	lZdd	lZdd	lZdd	lZer	 dd	l Z n# e$ r d	Z d
Z!Y nw xY wdd	l Z dd	l"Z"e rdd	l#Z#	 dd	l$Z$n# e$ r d	Z$Y nw xY wdd	l%Z%dd	l&Z&ddl'm(Z( ddl)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6 ddl7m8Z8m9Z9m:Z:m;Z;m<Z< ddl=m>Z>m?Z? ddlm@Z@mAZAmBZBmCZCmDZDmEZEmFZFmGZGmHZHmIZImJZJmKZKmLZLmMZMmNZNmOZOmPZP g d¢ZQ eR ej        eFrejS        nejT        d¦  «        dz   ¦  «        ZUg d¢ZVddgZWddl=mXZX dZY eGd¦  «        ZZ eGd¦  «        Z[ eRej\         ]                    d¦  «        pd¦  «        Z^ G d„ de_¦  «        Z`eFr'eja        jb        Zc edeceja        je        g¦  «        Zfd„ Zgnd„ Zg	 	 dnd!„Zhd"„ Zid#„ ZjejZk	 dd$llmmZj n# e$ r Y nw xY wdod&„Zndpd(„Zoe €dpd)„Zod*„ ZpeFrd+„ Zqd,„ Zrndd-lmsZsmtZt d.„ Zqd/„ Zr e@eqd0¦  «          e@erd1¦  «         d2„ Zud3„ Zvd4„ Zwd5Zx eGd6¦  «        Zydqd7„Zzd8„ Z{d9Z|e| }                    d:¦  «        Z~d;„ Zd<„ Z€d=Z� eGd>¦  «        Z‚d?„ ZƒdrdA„Z„dsdB„Z…eFrdsdC„Z†ndsdD„Z† e@e†dE¦  «          e8dFdG¬H¦  «        dtdI„¦   «         Z‡ eddJ ˆ                    ¦   «         ¦  «        Z‰ eddK ˆ                    ¦   «         ¦  «        ZŠ edddLg¦  «        Z‹dudN„ZŒdO„ Z�	 ddPlŽmŽZ� dQZ�d6Z‘e$r)ePr'dRej’        cxk    rdSk    rn n e$j“        ¦   «         Z”dQZ•nddTlm–Z–  e–¦   «         Z”d Z• eGdU¦  «        Z—eFr#dQZ˜	  e�dVdW¦  «         n# e™$ r d Z˜Y n Y nxY wdX„ ZšndQZ˜dY„ Zšn# e$ r d	Z�d Z�d Z˜d Z•d	Z”dZ„ ZšY nw xY w e@ešd[¦  «         d\„ Z›e%jœ        Z�e�Zžd]„ ZŸ	  ej         d^¦  «         dQZ¡n# e¢$ r d Z¡Y nw xY wdqd_„Z£e¡r ej¤        ¦   «         Z¥n ej¦         e£¦   «         ¦  «        Z¥d`„ Z§da„ Z¨dbZ© e8dGdcdd¬e¦  «        dfe©fdg„¦   «         ZªdhZ«di„ Z¬djZ­dk„ Z®dl„ Z¯dm„ Z°d	S )vz4passlib.utils -- helpers for writing password hashesé    )ÚJYTHON)Ú
b2a_base64Ú
a2b_base64ÚError)Ú	b64encodeÚ	b64decode)ÚSequence)ÚIterable)Úlookup)Úupdate_wrapperNznot present under Jython)Úwarn)ÚBASE64_CHARSÚ
AB64_CHARSÚHASH64_CHARSÚBCRYPT_CHARSÚBase64EngineÚLazyBase64EngineÚh64Úh64bigÚbcrypt64Úab64_encodeÚab64_decodeÚb64s_encodeÚb64s_decode)Údeprecated_functionÚdeprecated_methodÚmemoized_propertyÚclasspropertyÚhybrid_method)ÚExpectedStringErrorÚExpectedTypeError)Úadd_docÚ
join_bytesÚjoin_byte_valuesÚjoin_byte_elemsÚirangeÚimapÚPY3ÚuÚjoin_unicodeÚunicodeÚbyte_elem_valueÚ
nextgetterÚunicode_or_strÚunicode_or_bytes_typesÚget_method_functionÚsuppress_causeÚPYPY)r   Úsys_bitsÚunix_crypt_schemesÚrounds_cost_valuesÚconsteqÚsaslprepÚ	xor_bytesÚrender_bytesÚis_same_codecÚis_ascii_safeÚto_bytesÚ
to_unicodeÚto_native_strÚ	has_cryptÚ
test_cryptÚ
safe_cryptÚtickÚrngÚgetrandbytesÚ
getrandstrÚgenerate_passwordÚis_crypt_handlerÚis_crypt_contextÚhas_rounds_infoÚhas_salt_infoé   g      ø?)Úsha512_cryptÚsha256_cryptÚ
sha1_cryptÚbcryptÚ	md5_cryptÚ
bsdi_cryptÚ	des_cryptÚlinearÚlog2)ÚMissingBackendErroró    Ú ú ÚPASSLIB_MAX_PASSWORD_SIZEi   c                   ó<   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
d	S )
ÚSequenceMixinzƒ
    helper which lets result object act like a fixed-length sequence.
    subclass just needs to provide :meth:`_as_tuple()`.
    c                 ó    — t          d¦  «        ‚)Nzimplement in subclass)ÚNotImplementedError©Úselfs    úT/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/passlib/utils/__init__.pyÚ	_as_tuplezSequenceMixin._as_tuple—   s   € Ý!Ð"9Ñ:Ô:Ð:rV   c                 óD   — t          |                      ¦   «         ¦  «        S ©N)Úreprra   r^   s    r`   Ú__repr__zSequenceMixin.__repr__š   ó   € Ý�D—N’NÑ$Ô$Ñ%Ô%Ð%rV   c                 ó6   — |                       ¦   «         |         S rc   ©ra   )r_   Úidxs     r`   Ú__getitem__zSequenceMixin.__getitem__�   s   € Ø�~Š~ÑÔ Ô$Ð$rV   c                 óD   — t          |                      ¦   «         ¦  «        S rc   )Úiterra   r^   s    r`   Ú__iter__zSequenceMixin.__iter__    rf   rV   c                 óD   — t          |                      ¦   «         ¦  «        S rc   )Úlenra   r^   s    r`   Ú__len__zSequenceMixin.__len__£   s   € Ý�4—>’>Ñ#Ô#Ñ$Ô$Ð$rV   c                 ó2   — |                       ¦   «         |k    S rc   rh   ©r_   Úothers     r`   Ú__eq__zSequenceMixin.__eq__¦   s   € Ø�~Š~ÑÔ 5Ò(Ð(rV   c                 ó.   — |                       |¦  «         S rc   )rt   rr   s     r`   Ú__ne__zSequenceMixin.__ne__©   s   € Ø—;’;˜uÑ%Ô%Ð%Ð%rV   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__ra   re   rj   rm   rp   rt   rv   © rV   r`   r[   r[   ’   s‡   € € € € € ðð ð;ð ;ð ;ð&ð &ð &ð%ð %ð %ð&ð &ð &ð%ð %ð %ð)ð )ð )ð&ð &ð &ð &ð &rV   r[   c                 óö   — t          j        t          | ¦  «        ¦  «        j        }|sdS |                     |¦  «        }|r|j        t          vrdS |t          |¦  «        d                  j        t          k    S )ú*test if function accepts specified keywordFTéÿÿÿÿ)	ÚinspectÚ	signaturer0   Ú
parametersÚgetÚkindÚ_VAR_ANY_SETÚlistÚ_VAR_KEYWORD)ÚfuncÚkeyÚparamsÚargs       r`   Úaccepts_keywordr‹   ³   sq   € åÔ"Õ#6°tÑ#<Ô#<Ñ=Ô=ÔHˆØð 	Ø�5Ø�jŠj˜‰oŒoˆØð 	�3”8¥<Ð/Ð/Ø�4à•d˜6‘l”l 2Ô&Ô'Ô,µÒ<Ð<rV   c                 óh   — t          j        t          | ¦  «        ¦  «        }||j        v p|j        duS )r}   N)r   Ú
getargspecr0   ÚargsÚkeywords)r‡   rˆ   Úspecs      r`   r‹   r‹   À   s4   € åÔ!Õ"5°dÑ";Ô";Ñ<Ô<ˆØ�d”iÐÐ< 4¤=¸Ð#<Ð<rV   Fc                 óÖ  ‡— t          |t          ¦  «        r|g}t          | j        ¦  «        }|r=t          |t          ¦  «        r|g}|D ]"Š|r‰|v rŒ	‰|v r|                     ‰¦  «         Œ#|râ|D ]ßŠt          ˆfd„|D ¦   «         ¦  «        rŒ|rKt          |¦  «        D ]+\  }}	t          ‰|	¦  «        r n$|rt          |	|¦  «        r nŒ,t          |¦  «        }n^|rZt          t          |¦  «        ¦  «        D ]:\  }
}	t          |	|¦  «        r%t          |¦  «        |
z
  }||dz
           |	k    sJ ‚ nŒ;d}nd}| 
                    |‰¦  «         Œà|st          |¦  «        | _        dS dS )a  
    helper to update mixin classes installed in target class.

    :param target:
        target class whose bases will be modified.

    :param add:
        class / classes to install into target's base class list.

    :param remove:
        class / classes to remove from target's base class list.

    :param append:
        by default, prepends mixins to front of list.
        if True, appends to end of list instead.

    :param after:
        optionally make sure all mixins are inserted after
        this class / classes.

    :param before:
        optionally make sure all mixins are inserted before
        this class / classes.

    :param dryrun:
        optionally perform all calculations / raise errors,
        but don't actually modify the class.
    c              3   ó8   •K  — | ]}t          |‰¦  «        V — Œd S rc   )Ú
issubclass)Ú.0ÚbaseÚmixins     €r`   ú	<genexpr>z'update_mixin_classes.<locals>.<genexpr>ö   s-   øè è € Ð=Ð=¨t•:˜d EÑ*Ô*Ð=Ð=Ð=Ð=Ð=Ð=rV   é   r   N)Ú
isinstanceÚtyper…   Ú	__bases__ÚremoveÚanyÚ	enumerater“   ro   ÚreversedÚinsertÚtuple)ÚtargetÚaddrœ   ÚappendÚbeforeÚafterÚdryrunÚbasesri   r•   Úend_idxr–   s              @r`   Úupdate_mixin_classesrª   Å   s÷  ø€ õ< �#•tÑÔð Øˆeˆå�Ô!Ñ"Ô"€Eð ð $Ý�f�dÑ#Ô#ð 	Ø�XˆFØð 	$ð 	$ˆEØð �u �|�|ØØ˜ˆ~ˆ~Ø—’˜UÑ#Ô#Ð#øð ð  %Øð 	%ð 	%ˆEåÐ=Ð=Ð=Ð=°uÐ=Ñ=Ô=Ñ=Ô=ð Øð ð Ý!*¨5Ñ!1Ô!1ð 	%ð 	%‘I�C˜Ý! %¨Ñ.Ô.ð à˜Øð ¥*¨T°6Ñ":Ô":ð à˜øõ ˜e™*œ*�CøØð Ý%.­x¸©¬Ñ%?Ô%?ð ð ‘M�G˜TÝ! $¨Ñ.Ô.ð å! %™jœj¨7Ñ2˜Ø$ S¨¡Uœ|¨tÒ3Ð3Ð3Ð3Ø˜ð	ð �Cøð �ð �LŠL˜˜eÑ$Ô$Ð$Ð$ð ð (Ý  ™<œ<ˆÔÐÐð(ð (rV   c              #   óÊ  K  — |dk     rt          d¦  «        ‚t          | t          ¦  «        r4t          | ¦  «        }d}||k     r||z   }| ||…         V — |}||k     °dS dS t          | t          ¦  «        r`t          | ¦  «        }	 t          j        ||¦  «        }	 t          |¦  «        }n# t          $ r Y dS w xY wt          j
        |f|¦  «        V — ŒPt          d¦  «        ‚)z8
    split iterable into chunks of <size> elements.
    r˜   zsize must be positive integerr   Tzsource must be iterableN)Ú
ValueErrorr™   r	   ro   r
   rl   Ú	itertoolsÚisliceÚnextÚStopIterationÚchainÚ	TypeError)ÚsourceÚsizeÚendÚiÚnÚitrÚ	chunk_itrÚfirsts           r`   Úbatchr»     s  è è € ð ˆa‚x€xÝÐ8Ñ9Ô9Ð9Ý�&�(Ñ#Ô#ð 3Ý�&‰kŒkˆØˆØ�#ŠgˆgØ�D‘ˆAØ˜˜1˜”+ÐÐÐØˆAð �#Šgˆgˆgˆgˆgˆgõ 
�F�HÑ	%Ô	%ð 
3Ý�6‰lŒlˆð	7Ý!Ô(¨¨dÑ3Ô3ˆIðÝ˜Y™œ��øÝ ð ð ð Ø��ðøøøå”/ 5 (¨IÑ6Ô6Ð6Ð6Ð6ð	7õ Ð1Ñ2Ô2Ð2s   ÂB, Â,
B:Â9B:c                 ó0  — t          | t          ¦  «        r't          |t          ¦  «        st          d¦  «        ‚d}nPt          | t          ¦  «        r,t          |t          ¦  «        st          d¦  «        ‚t          }nt          d¦  «        ‚t          | ¦  «        t          |¦  «        k    }|r| }d}|s|}d}|rt          ||¦  «        D ]\  }}|||z  z  }Œn8t          ||¦  «        D ]'\  }}|t          |¦  «        t          |¦  «        z  z  }Œ(|dk    S )aç  Check two strings/bytes for equality.

    This function uses an approach designed to prevent
    timing analysis, making it appropriate for cryptography.
    a and b must both be of the same type: either str (ASCII only),
    or any type that supports the buffer protocol (e.g. bytes).

    Note: If a and b are of different lengths, or if an error occurs,
    a timing attack could theoretically reveal information about the
    types and lengths of a and b--but not their values.
    z)inputs must be both unicode or both bytesFr   r˜   )r™   r+   r²   Úbytesr(   ro   ÚzipÚord)ÚleftÚrightÚis_py3_bytesÚ	same_sizeÚtmpÚresultÚlÚrs           r`   r6   r6   ;  sE  € õ* �$�Ñ Ô ð 	EÝ˜%¥Ñ)Ô)ð 	IÝÐGÑHÔHÐHØˆˆÝ	�D�%Ñ	 Ô	 ð EÝ˜%¥Ñ'Ô'ð 	IÝÐGÑHÔHÐHÝˆˆåÐCÑDÔDÐDõ �T‘”�c %™jœjÒ(€IØð àˆØˆØð ð ˆØˆð ð &Ý�s˜E‘?”?ð 	ð 	‰CˆAˆaØ�a˜!‘e‰OˆFˆFð	õ �s˜E‘?”?ð 	&ð 	&‰CˆAˆaØ•c˜!‘f”f�s 1™vœv‘oÑ%ˆFˆFØ�QŠ;ÐrV   )Úcompare_digestú,c                 ó®   — |                       ¦   «         } |                      |¦  «        r
| dd…         } | sg S d„ |                      |¦  «        D ¦   «         S )zRsplit comma-separated string into list of elements,
    stripping whitespace.
    Nr~   c                 ó6   — g | ]}|                      ¦   «         ‘ŒS r{   )Ústrip©r”   Úelems     r`   ú
<listcomp>zsplitcomma.<locals>.<listcomp>�  s    € Ð9Ð9Ð9˜dˆT�ZŠZ‰\Œ\Ð9Ð9Ð9rV   )rÌ   ÚendswithÚsplit)r³   Úseps     r`   Ú
splitcommarÓ   †  s_   € ð �\Š\‰^Œ^€FØ‡‚�sÑÔð Ø˜˜˜”ˆØð Øˆ	Ø9Ð9 f§l¢l°3Ñ&7Ô&7Ð9Ñ9Ô9Ð9rV   Úvaluec                 ó2  ‡‡— t          | t          ¦  «        st          dt          | ¦  «        ›�¦  «        ‚t          j        Št          j        Št          ˆˆfd„| D ¦   «         ¦  «        }t          j	        d|¦  «        }|st          S t          j        } ||d         ¦  «        r0 ||d         ¦  «        st          d|z   ¦  «        ‚t          j        }n|}t          j        }t          j        }t          j        }t          j        }t          j        }	t          j        }
t          j        }t          j        }t          j        }|D �]O} ‰|¦  «        r
J d¦   «         ‚ ‰|¦  «        r
J d¦   «         ‚ ||¦  «        rt          d	|z   ¦  «        ‚ ||¦  «        rt          d
|z   ¦  «        ‚ ||¦  «        rt          d|z   ¦  «        ‚ ||¦  «        rt          d|z   ¦  «        ‚ |	|¦  «        rt          d|z   ¦  «        ‚ |
|¦  «        rt          d|z   ¦  «        ‚ ||¦  «        rt          d|z   ¦  «        ‚ ||¦  «        rt          d|z   ¦  «        ‚ ||¦  «        rt          d|z   ¦  «        ‚ ||¦  «        rt          d|z   ¦  «        ‚�ŒQ|S )a  Normalizes unicode strings using SASLPrep stringprep profile.

    The SASLPrep profile is defined in :rfc:`4013`.
    It provides a uniform scheme for normalizing unicode usernames
    and passwords before performing byte-value sensitive operations
    such as hashing. Among other things, it normalizes diacritic
    representations, removes non-printing characters, and forbids
    invalid characters such as ``\n``. Properly internationalized
    applications should run user passwords through this function
    before hashing.

    :arg source:
        unicode string to normalize & validate

    :param param:
        Optional noun identifying source parameter in error messages
        (Defaults to the string ``"value"``). This is mainly useful to make the caller's error
        messages make more sense contextually.

    :raises ValueError:
        if any characters forbidden by the SASLPrep profile are encountered.

    :raises TypeError:
        if input is not :class:`!unicode`

    :returns:
        normalized unicode string

    .. note::

        This function is not available under Jython,
        as the Jython stdlib is missing the :mod:`!stringprep` module
        (`Jython issue 1758320 <http://bugs.jython.org/issue1758320>`_).

    .. versionadded:: 1.6
    z"input must be unicode string, not c              3   óV   •K  — | ]#} ‰|¦  «        ° ‰|¦  «        rt           n|V — Œ$d S rc   )Ú_USPACE)r”   ÚcÚin_table_b1Úin_table_c12s     €€r`   r—   zsaslprep.<locals>.<genexpr>Æ  sV   øè è € ð 
ð 
àØˆ{˜1‰~Œ~ð
Ø�< ‘?”?Ð)�ˆ¨ð
ð 
ð 
ð 
ð 
ð 
rV   ÚNFKCr   r~   zmalformed bidi sequence in z$failed to strip B.1 in mapping stagez(failed to replace C.1.2 in mapping stagez$unassigned code points forbidden in z control characters forbidden in z$private use characters forbidden in z"non-char code points forbidden in zsurrogate codes forbidden in z!non-plaintext chars forbidden in z!non-canonical chars forbidden in z1display-modifying / deprecated chars forbidden inztagged characters forbidden in zforbidden bidi character in )r™   r+   r²   rš   Ú
stringpreprÚ   rÙ   r*   ÚunicodedataÚ	normalizeÚ_UEMPTYÚin_table_d1r¬   Úin_table_d2Úin_table_a1Úin_table_c21_c22Úin_table_c3Úin_table_c4Úin_table_c5Úin_table_c6Úin_table_c7Úin_table_c8Úin_table_c9)r³   ÚparamÚdataÚis_ral_charÚis_forbidden_bidi_charrâ   rã   rä   rå   ræ   rç   rè   ré   rê   rØ   rÙ   rÚ   s                  @@r`   r7   r7   ‘  s4  øø€ õX �f�gÑ&Ô&ð )ÝˆiÝ˜f™œ˜ð(ñ )ô )ð 	)õ Ô*€LÝÔ(€KÝð 
ð 
ð 
ð 
ð 
àð
ñ 
ô 
ñ 
ô 
€Dõ Ô  ¨Ñ.Ô.€DØð Ýˆõ Ô(€KØ€{�4˜”7ÑÔð -Øˆ{˜4 œ8Ñ$Ô$ð 	DÝÐ:¸UÑBÑCÔCÐCå!+Ô!7ÐÐð "-Ðõ Ô(€KÝ!Ô2ÐÝÔ(€KÝÔ(€KÝÔ(€KÝÔ(€KÝÔ(€KÝÔ(€KÝÔ(€KØð Eñ Eˆà�;˜q‘>”>ÐIÐIÐ#IÑIÔIÐ!Ø�< ‘?”?ÐNÐNÐ$NÑNÔNÐ"ð ˆ;�q‰>Œ>ð 	MÝÐCÀeÑKÑLÔLÐLØÐ˜AÑÔð 	IÝÐ?À%ÑGÑHÔHÐHØˆ;�q‰>Œ>ð 	MÝÐCÀeÑKÑLÔLÐLØˆ;�q‰>Œ>ð 	KÝÐAÀEÑIÑJÔJÐJØˆ;�q‰>Œ>ð 	FÝÐ<¸uÑDÑEÔEÐEØˆ;�q‰>Œ>ð 	JÝÐ@À5ÑHÑIÔIÐIØˆ;�q‰>Œ>ð 	Jõ Ð@À5ÑHÑIÔIÐIØˆ;�q‰>Œ>ð 	5Ýð ,Ø.3ñ4ñ 5ô 5ð 5àˆ;�q‰>Œ>ð 	HÝÐ>ÀÑFÑGÔGÐGð "Ð! !Ñ$Ô$ð 	EÝÐ;¸eÑCÑDÔDÐDñ	Eð €KrV   c                 ó0   — t          dt          z   ¦  «        ‚)zstub for saslprep()z>saslprep() support requires the 'stringprep' module, which is )r]   Ú_stringprep_missing_reason)r³   rë   s     r`   r7   r7     s%   € å!ð #0Ý2Lñ#Mñ Nô Nð 	NrV   c                 ó¸   — t          | t          ¦  «        r|                      d¦  «        } | t          d„ |D ¦   «         ¦  «        z  }|                     d¦  «        S )a   Peform ``%`` formating using bytes in a uniform manner across Python 2/3.

    This function is motivated by the fact that
    :class:`bytes` instances do not support ``%`` or ``{}`` formatting under Python 3.
    This function is an attempt to provide a replacement:
    it converts everything to unicode (decoding bytes instances as ``latin-1``),
    performs the required formatting, then encodes the result to ``latin-1``.

    Calling ``render_bytes(source, *args)`` should function roughly the same as
    ``source % args`` under Python 2.

    .. todo::
        python >= 3.5 added back limited support for bytes %,
        can revisit when 3.3/3.4 is dropped.
    úlatin-1c              3   ón   K  — | ]0}t          |t          ¦  «        r|                     d ¦  «        n|V — Œ1dS )rò   N)r™   r½   Údecode)r”   rŠ   s     r`   r—   zrender_bytes.<locals>.<genexpr>,  sZ   è è € ð 6ð 6Ø),õ 6@ÀÅUÑ5KÔ5Kð %˜CŸJšJ yÑ1Ô1Ð1Ø!$ð6ð 6ð 6ð 6ð 6ð 6rV   )r™   r½   rô   r¡   Úencode)r³   rŽ   rÅ   s      r`   r9   r9     sk   € õ  �&�%Ñ Ô ð *Ø—’˜yÑ)Ô)ˆØ•eð 6ð 6Ø04ð6ñ 6ô 6ñ 6ô 6ñ 6€Fà�=Š=˜Ñ#Ô#Ð#rV   c                 ó8   — t                                | d¦  «        S ©NÚbig)ÚintÚ
from_bytes©rÔ   s    r`   Úbytes_to_intrü   2  s   € Ý�~Š~˜e UÑ+Ô+Ð+rV   c                 ó.   — |                       |d¦  «        S r÷   )r<   ©rÔ   Úcounts     r`   Úint_to_bytesr   4  s   € Ø�~Š~˜e UÑ+Ô+Ð+rV   )ÚhexlifyÚ	unhexlifyc                 ó<   — t          t          | ¦  «        d¦  «        S )Né   )rù   r  rû   s    r`   rü   rü   9  s   € Ý•7˜5‘>”> "Ñ%Ô%Ð%rV   c                 ó2   — t          d|dz  z  | z  ¦  «        S )Nz%%0%dxr˜   )r  rþ   s     r`   r   r   ;  s   € Ý˜( e¨Q¡hÑ/°5Ñ8Ñ9Ô9Ð9rV   z/decode byte string as single big-endian integerz/encode integer as single big-endian byte stringc                 óv   — t          t          | ¦  «        t          |¦  «        z  t          | ¦  «        ¦  «        S )z;Perform bitwise-xor of two byte strings (must be same size))r   rü   ro   ©rÀ   rÁ   s     r`   r8   r8   A  s-   € å� TÑ*Ô*­\¸%Ñ-@Ô-@Ñ@Å#ÀdÁ)Ä)ÑLÔLÐLrV   c                 óL   — d|dz
  t          | ¦  «        z  z   }| |z  d|…         S )zE
    repeat or truncate <source> string, so it has length <size>
    r˜   N)ro   ©r³   r´   Úmults      r`   Úrepeat_stringr  E  s0   € ð ��q‘�S ™[œ[Ñ(Ñ(€DØ�T‰M˜5˜D˜5Ô!Ð!rV   c                 óX   — d|dz
  t          | ¦  «        z  z   }t          | |z  |¦  «        S )zN
    variant of repeat_string() which truncates to nearest UTF8 boundary.
    r˜   )ro   Úutf8_truncater	  s      r`   Úutf8_repeat_stringr  M  s1   € ð ��q‘�S ™[œ[Ñ(Ñ(€DÝ˜ $™¨Ñ-Ô-Ð-rV   ó    ú c                 ó    — t          | ¦  «        }||k    r0|€#t          | t          ¦  «        rt          nt          }| |||z
  z  z   S | d|…         S )z>right-pad or truncate <source> string, so it has length <size>N)ro   r™   r+   Ú_UNULLÚ_BNULL)r³   r´   ÚpadÚcurs       r`   Úright_pad_stringr  X  sT   € å
ˆf‰+Œ+€CØˆc‚z€zØˆ;Ý& v­wÑ7Ô7ÐC•&�&½VˆCØ�c˜4 ™8‘nÑ$Ð$à�e�t�eŒ}ÐrV   c                 óŠ  ‡ ‡— t          ‰ t          ¦  «        st          ‰ t          d¦  «        ‚t          ‰ ¦  «        }|dk     rt	          d||z   ¦  «        }||k    r‰ S t          |dz   |¦  «        }||k     r(t          ‰ |         ¦  «        dz  dk    rn|dz  }||k     °(||k    sJ ‚‰ d|…         Šˆˆ fd„} |¦   «         sJ ‚‰S )	aÃ  
    helper to truncate UTF8 byte string to nearest character boundary ON OR AFTER <index>.
    returned prefix will always have length of at least <index>, and will stop on the
    first byte that's not a UTF8 continuation byte (128 - 191 inclusive).
    since utf8 should never take more than 4 bytes to encode known unicode values,
    we can stop after ``index+3`` is reached.

    :param bytes source:
    :param int index:
    :rtype: bytes
    r³   r   é   éÀ   é€   r˜   Nc                  ó¬   •— 	 ‰                      d¦  «        } n# t          $ r Y dS w xY w|                      ‰                      d¦  «        ¦  «        sJ ‚dS )Núutf-8T)rô   ÚUnicodeDecodeErrorÚ
startswith)ÚtextrÅ   r³   s    €€r`   Úsanity_checkz#utf8_truncate.<locals>.sanity_check–  sh   ø€ ð	Ø—=’= Ñ)Ô)ˆDˆDøÝ!ð 	ð 	ð 	à�4�4ð	øøøð
 �Š˜vŸ}š}¨WÑ5Ô5Ñ6Ô6Ð6Ð6Ð6Øˆts   ƒ ™
'¦')r™   r½   r!   ro   ÚmaxÚminr,   )r³   Úindexrµ   r   rÅ   s   `   @r`   r  r  c  s  øø€ õ2 �f�eÑ$Ô$ð 9Ý ­¨xÑ8Ô8Ð8õ ˆf‰+Œ+€CØˆq‚y€yÝ�A�u˜s‘{Ñ#Ô#ˆØ�‚|€|Øˆõ ˆe�a‰i˜Ñ
Ô
€Cð �#Š+ˆ+Ý˜6 %œ=Ñ)Ô)¨DÑ0°DÒ8Ð8àà�‰
ˆð �#Š+ˆ+ð ˜Š|ˆ|ˆ|ˆ|ð �F�U�FŒ^€Fð
ð 
ð 
ð 
ð 
ð 
ð ˆ<‰>Œ>ÐÐˆ>à€MrV   s	    
 aA:#!Úasciic                 óH   — t                                | ¦  «        t          k    S )zRTest if codec is compatible with 7-bit ascii (e.g. latin-1, utf-8; but not utf-16))Ú_ASCII_TEST_UNICODErõ   Ú_ASCII_TEST_BYTES)Úcodecs    r`   Úis_ascii_codecr)  ¬  s   € å×%Ò% eÑ,Ô,Õ0AÒAÐArV   c                 ór   — | |k    rdS | r|sdS t          | ¦  «        j        t          |¦  «        j        k    S )z3Check if two codec names are aliases for same codecTF)Ú_lookup_codecÚnamer  s     r`   r:   r:   °  sE   € àˆu‚}€}ØˆtØð �Uð ØˆuÝ˜ÑÔÔ#¥}°UÑ';Ô';Ô'@Ò@Ð@rV   r  õ   Â€c                 ó€   ‡— t          | t          ¦  «        rt          nt          Št	          ˆfd„| D ¦   «         ¦  «        S )z<Check if string (bytes or unicode) contains only 7-bit asciic              3   ó$   •K  — | ]
}|‰k     V — Œd S rc   r{   )r”   rØ   rÇ   s     €r`   r—   z is_ascii_safe.<locals>.<genexpr>½  s'   øè è € Ð%Ð%˜ˆq�1ŠuÐ%Ð%Ð%Ð%Ð%Ð%rV   )r™   r½   Ú_B80Ú_U80Úall)r³   rÇ   s    @r`   r;   r;   º  s>   ø€ å˜6¥5Ñ)Ô)Ð3�ˆ­t€AÝÐ%Ð%Ð%Ð%˜fÐ%Ñ%Ô%Ñ%Ô%Ð%rV   r  c                 ó   — |sJ ‚t          | t          ¦  «        r<|r8t          ||¦  «        s(|                      |¦  «                             |¦  «        S | S t          | t
          ¦  «        r|                      |¦  «        S t          | |¦  «        ‚)a  Helper to normalize input to bytes.

    :arg source:
        Source bytes/unicode to process.

    :arg encoding:
        Target encoding (defaults to ``"utf-8"``).

    :param param:
        Optional name of variable/noun to reference when raising errors

    :param source_encoding:
        If this is specified, and the source is bytes,
        the source will be transcoded from *source_encoding* to *encoding*
        (via unicode).

    :raises TypeError: if source is not unicode or bytes.

    :returns:
        * unicode strings will be encoded using *encoding*, and returned.
        * if *source_encoding* is not specified, byte strings will be
          returned unchanged.
        * if *source_encoding* is specified, byte strings will be transcoded
          to *encoding*.
    )r™   r½   r:   rô   rõ   r+   r    )r³   Úencodingrë   Úsource_encodings       r`   r<   r<   ¿  s‘   € ð4 €O€Oˆ8Ý�&�%Ñ Ô ð 1Øð 	¥=°À(Ñ#KÔ#Kð 	Ø—=’= Ñ1Ô1×8Ò8¸ÑBÔBÐBàˆMÝ	�F�GÑ	$Ô	$ð 1Ø�}Š}˜XÑ&Ô&Ð&å! &¨%Ñ0Ô0Ð0rV   c                 ó¬   — |sJ ‚t          | t          ¦  «        r| S t          | t          ¦  «        r|                      |¦  «        S t	          | |¦  «        ‚)a¼  Helper to normalize input to unicode.

    :arg source:
        source bytes/unicode to process.

    :arg encoding:
        encoding to use when decoding bytes instances.

    :param param:
        optional name of variable/noun to reference when raising errors.

    :raises TypeError: if source is not unicode or bytes.

    :returns:
        * returns unicode strings unchanged.
        * returns bytes strings decoded using *encoding*
    )r™   r+   r½   rô   r    ©r³   r4  rë   s      r`   r=   r=   ä  sX   € ð$ €O€Oˆ8Ý�&�'Ñ"Ô"ð 1ØˆÝ	�F�EÑ	"Ô	"ð 1Ø�}Š}˜XÑ&Ô&Ð&å! &¨%Ñ0Ô0Ð0rV   c                 ó¤   — t          | t          ¦  «        r|                      |¦  «        S t          | t          ¦  «        r| S t	          | |¦  «        ‚rc   )r™   r½   rô   r+   r    r7  s      r`   r>   r>   ÿ  sM   € Ý�f�eÑ$Ô$ð 	5Ø—=’= Ñ*Ô*Ð*Ý˜¥Ñ(Ô(ð 	5ØˆMå% f¨eÑ4Ô4Ð4rV   c                 ó¤   — t          | t          ¦  «        r| S t          | t          ¦  «        r|                      |¦  «        S t	          | |¦  «        ‚rc   )r™   r½   r+   rõ   r    r7  s      r`   r>   r>     sM   € Ý�f�eÑ$Ô$ð 	5ØˆMÝ˜¥Ñ(Ô(ð 	5Ø—=’= Ñ*Ô*Ð*å% f¨eÑ4Ô4Ð4rV   a>  Take in unicode or bytes, return native string.

    Python 2: encodes unicode using specified encoding, leaves bytes alone.
    Python 3: leaves unicode alone, decodes bytes using specified encoding.

    :raises TypeError: if source is not unicode or bytes.

    :arg source:
        source unicode or bytes string.

    :arg encoding:
        encoding to use when encoding unicode or decoding bytes.
        this defaults to ``"utf-8"``.

    :param param:
        optional name of variable/noun to reference when raising errors.

    :returns: :class:`str` instance
    z1.6z1.7)Ú
deprecatedÚremovedc                 ó&   — t          | |d¬¦  «        S )z'deprecated, use to_native_str() insteadÚhash)rë   )r>   )r³   r4  s     r`   Úto_hash_strr>  $  s   € õ ˜ °Ð8Ñ8Ô8Ð8rV   z true t yes y on 1 enable enabledz#false f no n off 0 disable disabledÚnoneÚbooleanc                 óD  — |dv sJ ‚t          | t          ¦  «        r\|                      ¦   «                              ¦   «         }|t          v rdS |t
          v rdS |t          v r|S t          d|›d| ›�¦  «        ‚t          | t          ¦  «        r| S | €|S t          | ¦  «        S )z\
    helper to convert value to boolean.
    recognizes strings such as "true", "false"
    )TFNTFzunrecognized z value: )	r™   r/   ÚlowerrÌ   Ú	_true_setÚ
_false_setÚ	_none_setr¬   Úbool)rÔ   r?  rë   Úcleans       r`   Úas_boolrH  -  sº   € ð
 Ð&Ð&Ð&Ð&Ð&Ý�%Õ/Ñ0Ô0ð Ø—’‘”×#Ò#Ñ%Ô%ˆØ•IÐÐØ�4Ø•JÐÐØ�5Ø•IÐÐØˆKÝˆj¸¸¸¸u¸uÐEÑFÔFÐFÝ	�E�4Ñ	 Ô	 ð ØˆØ	ˆØˆå�E‰{Œ{ÐrV   c                 ó�   — t           st          | t          ¦  «        sdS 	 |                      d¦  «         dS # t          $ r Y dS w xY w)zƒ
    UT helper --
    test if value is safe to pass to crypt.crypt();
    under PY3, can't pass non-UTF8 bytes to crypt.crypt.
    Tr  F)Úcrypt_accepts_bytesr™   r½   rô   r  rû   s    r`   Úis_safe_crypt_inputrK  G  s`   € õ ð ¥*¨UµEÑ":Ô":ð ØˆtðØ�Š�WÑÔÐØˆtøÝð ð ð Øˆuˆuðøøøs    7 ·
AÁA)ÚcryptT)é   rK   r   )rM  r  r  )Únullcontextz*:!ó   îÚxxc                 ó4  — t           rmt          | t          ¦  «        r|                      d¦  «        } t          | v rt          d¦  «        ‚t          |t          ¦  «        r|                     d¦  «        }n¤t          | t          ¦  «        rM| }	 |                      d¦  «        } n# t          $ r Y d S w xY w|                      d¦  «        |k    s
J d¦   «         ‚t          | v rt          d¦  «        ‚t          |t          ¦  «        r|                     d¦  «        }	 t          5  t          | |¦  «        }d d d ¦  «         n# 1 swxY w Y   n# t          $ r Y d S w xY wt          |t          ¦  «        r|                     d¦  «        }|r|d         t          v rd S |S )Nr  únull character in secretr$  z"utf-8 spec says this can't happen!r   )rJ  r™   r+   rõ   r  r¬   r½   rô   r  Ú_NULLÚ_safe_crypt_lockÚ_cryptÚOSErrorÚ_invalid_prefixes)Úsecretr=  ÚorigrÅ   s       r`   rA   rA   ˆ  s   € Ý"ð 0õ ˜f¥gÑ.Ô.ð 4Ø#Ÿ]š]¨7Ñ3Ô3�FÝ˜VÐ#Ð#Ý$Ð%?Ñ@Ô@Ð@Ý˜d¥GÑ,Ô,ð 0ØŸ;š; wÑ/Ô/�Døõ
 ˜f¥eÑ,Ô,ð 	EØ!�Dð$Ø!'§¢¨wÑ!7Ô!7˜˜øÝ-ð $ð $ð $Ø#˜t˜tð$øøøð "Ÿ=š=¨Ñ1Ô1°TÒ9Ð9Ð9Ø Dñ :Ô9Ð9å˜F�?�?Ý$Ð%?Ñ@Ô@Ð@Ý˜d¥EÑ*Ô*ð 0ØŸ;š; wÑ/Ô/�DðÝ%ð 2ð 2Ý# F¨DÑ1Ô1�Fð2ð 2ð 2ñ 2ô 2ð 2ð 2ð 2ð 2ð 2ð 2øøøð 2ð 2ð 2ð 2øøåð ð ð ð �t�tð	øøøõ ˜&¥%Ñ(Ô(ð 0ØŸš wÑ/Ô/�Øð ˜V AœYÕ*;Ð;Ð;Ø�tØˆMsH   ÂB# Â#
B1Â0B1ÄE
 Ä!D>Ä2E
 Ä>EÅE
 ÅEÅE
 Å

EÅEc                 ó�  — t          | t          ¦  «        r|                      d¦  «        } t          | v rt	          d¦  «        ‚t          |t          ¦  «        r|                     d¦  «        }t
          5  t          | |¦  «        }d d d ¦  «         n# 1 swxY w Y   |sd S |                     d¦  «        }|d         t          v rd S |S )Nr  rR  r$  r   )	r™   r+   rõ   rS  r¬   rT  rU  rô   rW  )rX  r=  rÅ   s      r`   rA   rA   º  s  € Ý˜&¥'Ñ*Ô*ð 0ØŸš wÑ/Ô/�Ý˜ˆˆÝ Ð!;Ñ<Ô<Ð<Ý˜$¥Ñ(Ô(ð ,Ø—{’{ 7Ñ+Ô+�Ý!ð .ð .Ý ¨Ñ-Ô-�ð.ð .ð .ñ .ô .ð .ð .ð .ð .ð .ð .øøøð .ð .ð .ð .àð Ø�tØ—]’] 7Ñ+Ô+ˆFØ�aŒyÕ-Ð-Ð-Ø�tØˆMs   Á4BÂBÂBc                 ó   — d S rc   r{   ©rX  r=  s     r`   rA   rA   ]  s   € ØˆtrV   aì  Wrapper around stdlib's crypt.

    This is a wrapper around stdlib's :func:`!crypt.crypt`, which attempts
    to provide uniform behavior across Python 2 and 3.

    :arg secret:
        password, as bytes or unicode (unicode will be encoded as ``utf-8``).

    :arg hash:
        hash or config string, as ascii bytes or unicode.

    :returns:
        resulting hash as ascii unicode; or ``None`` if the password
        couldn't be hashed due to one of the issues:

        * :func:`crypt()` not available on platform.

        * Under Python 3, if *secret* is specified as bytes,
          it must be use ``utf-8`` or it can't be passed
          to :func:`crypt()`.

        * Some OSes will return ``None`` if they don't recognize
          the algorithm being used (though most will simply fall
          back to des-crypt).

        * Some OSes will return an error string if the input config
          is recognized but malformed; current code converts these to ``None``
          as well.
    c                 ó    — t          |t          ¦  «        sJ dt          |¦  «        z  ¦   «         ‚|s
J d¦   «         ‚t          | |¦  «        |k    S )z°check if :func:`crypt.crypt` supports specific hash
    :arg secret: password to test
    :arg hash: known hash of password to use as reference
    :returns: True or False
    z#hash must be unicode_or_str, got %szhash must be non-empty)r™   r.   rš   rA   r\  s     r`   r@   r@   è  s_   € õ �d�NÑ+Ô+ð ;ð ;Ø-µ°T±
´
Ñ:ñ;ô ;Ð+àÐ)Ð)Ð)Ñ)Ô)ˆ4Ý�f˜dÑ#Ô# tÒ+Ð+rV   c                 ó²   — t          j        d| ¦  «        }|r?t          d„ |                     d¦  «                             d¦  «        D ¦   «         ¦  «        S dS )zhelper to parse version stringz(\d+(?:\.\d+)+)c              3   ó4   K  — | ]}t          |¦  «        V — Œd S rc   )rù   rÍ   s     r`   r—   z parse_version.<locals>.<genexpr>ÿ  s(   è è € ÐAÐA 4•S˜‘Y”YÐAÐAÐAÐAÐAÐArV   r˜   ú.N)ÚreÚsearchr¡   ÚgrouprÑ   )r³   Úms     r`   Úparse_versionre  û  sW   € å
Œ	Ð$ fÑ-Ô-€AØð BÝÐAÐA¨1¯7ª7°1©:¬:×+;Ò+;¸CÑ+@Ô+@ÐAÑAÔAÑAÔAÐAØˆ4rV   r˜   c           	      óˆ  — ddl m} t          | d¦  «        rKt          | d¦  «        r;	 |                      ¦   «         } n%# t          $ r |                      d¦  «        } Y nw xY wt          d¦  «        | t          t          d¦  «        rt          j        ¦   «         ndt          t          ¦   «         ¦  «        t          j        ¦   «         t          ¦   «         t          r't          j        d	¦  «                             d
¦  «        ndfz  }t!           ||                     d¦  «        ¦  «                             ¦   «         d¦  «        S )z.generate prng seed value from system resourcesr   )Úsha512ÚgetstateÚgetrandbitsi €  z%s %s %s %.15f %.15f %sÚgetpidNé    rò   r  r  )Úhashlibrg  Úhasattrrh  r]   ri  r)   Úosrj  ÚidÚobjectÚtimerB   Úhas_urandomÚurandomrô   rù   rõ   Ú	hexdigest)rÔ   rg  r  s      r`   Úgenseedru    s6  € àÐÐÐÐÐÝˆu�jÑ!Ô!ð /¥g¨e°]Ñ&CÔ&Cð /ð	/Ø—N’NÑ$Ô$ˆEˆEøÝ"ð 	/ð 	/ð 	/ð ×%Ò% gÑ.Ô.ˆEˆEˆEð	/øøøõ Ð&Ñ'Ô'àõ �r 8Ñ,Ô,Ð6�Œ	‰Œˆ°$õ 	�6‰8Œ8‰Œõ 	Œ	‰ŒÝ‰Œõ -8Ð>�Œ
�2‰Œ×Ò˜iÑ(Ô(Ð(¸Qð#+
ñ 
€Dõ( ˆvˆv�d—k’k 'Ñ*Ô*Ñ+Ô+×5Ò5Ñ7Ô7¸Ñ<Ô<Ð<s   ¨= ½AÁAc                 óR   ‡ ‡— ‰st           S ˆˆ fd„}t           |¦   «         ¦  «        S )z]return byte-string containing *count* number of randomly generated bytes, using specified rngc               3   ó~   •K  — ‰                      ‰dz  ¦  «        } d}|‰k     r| dz  V — | dz  } |dz  }|‰k     °d S d S )Nr  r   éÿ   r˜   )ri  )rÔ   r¶   rÿ   rC   s     €€r`   Úhelperzgetrandbytes.<locals>.helperM  s_   øè è € à—’  q¡Ñ)Ô)ˆØˆØ�%ŠiˆiØ˜$‘,ÐÐÐØ�a‰KˆEØ�‰FˆAð �%ŠiˆiˆiˆiˆiˆirV   )Ú_BEMPTYr$   )rC   rÿ   ry  s   `` r`   rD   rD   B  sG   øø€ ð ð Ýˆðð ð ð ð ð õ ˜F˜F™HœHÑ%Ô%Ð%rV   c                 ó(  ‡ ‡‡‡— ‰dk     rt          d¦  «        ‚t          ‰¦  «        Š‰dk    rt          d¦  «        ‚‰dk    r‰‰z  S ˆˆˆˆ fd„}t          ‰t          ¦  «        rt	           |¦   «         ¦  «        S t           |¦   «         ¦  «        S )z|return string containing *count* number of chars/bytes, whose elements are drawn from specified charset, using specified rngr   zcount must be >= 0zalphabet must not be emptyr˜   c               3   óŒ   •K  — ‰                      d‰‰z  ¦  «        } d}|‰k     r‰| ‰z           V — | ‰z  } |dz  }|‰k     °d S d S )Nr   r˜   )Ú	randrange)rÔ   r¶   Úcharsetrÿ   ÚlettersrC   s     €€€€r`   ry  zgetrandstr.<locals>.helperf  sg   øè è € à—’˜a ¨%¡Ñ0Ô0ˆØˆØ�%ŠiˆiØ˜% '™/Ô*Ð*Ð*Ð*Ø�gÑˆEØ�‰FˆAð �%ŠiˆiˆiˆiˆiˆirV   )r¬   ro   r™   r+   r*   r%   )rC   r~  rÿ   ry  r  s   ``` @r`   rE   rE   W  sº   øøøø€ ð ˆq‚y€yÝÐ-Ñ.Ô.Ð.Ý�'‰lŒl€GØ�!‚|€|ÝÐ5Ñ6Ô6Ð6Ø�!‚|€|Ø˜‰Ððð ð ð ð ð ð ð õ �'�7Ñ#Ô#ð )Ý˜F˜F™HœHÑ%Ô%Ð%å˜v˜v™xœxÑ(Ô(Ð(rV   Ú42346789ABCDEFGHJKMNPQRTUVWXYZabcdefghjkmnpqrstuvwxyzz2.0z/passlib.pwd.genword() / passlib.pwd.genphrase())r:  r;  Úreplacementé
   c                 ó.   — t          t          || ¦  «        S )aw  generate random password using given length & charset

    :param size:
        size of password.

    :param charset:
        optional string specified set of characters to draw from.

        the default charset contains all normal alphanumeric characters,
        except for the characters ``1IiLl0OoS5``, which were omitted
        due to their visual similarity.

    :returns: :class:`!str` containing randomly generated password.

    .. note::

        Using the default character set, on a OS with :class:`!SystemRandom` support,
        this function should generate passwords with 5.7 bits of entropy per character.
    )rE   rC   )r´   r~  s     r`   rF   rF   v  s   € õ, •c˜7 DÑ)Ô)Ð)rV   )r,  Úsetting_kwdsÚcontext_kwdsÚverifyr=  Úidentifyc                 óD   ‡ — t          ˆ fd„t          D ¦   «         ¦  «        S )z4check if object follows the :ref:`password-hash-api`c              3   ó8   •K  — | ]}t          ‰|¦  «        V — Œd S rc   ©rm  ©r”   r,  Úobjs     €r`   r—   z#is_crypt_handler.<locals>.<genexpr>š  ó-   øè è € Ð=Ð= d�w�s˜DÑ!Ô!Ð=Ð=Ð=Ð=Ð=Ð=rV   )r2  Ú_handler_attrs©rŒ  s   `r`   rG   rG   —  ó(   ø€ õ Ð=Ð=Ð=Ð=­nÐ=Ñ=Ô=Ñ=Ô=Ð=rV   )Úneeds_updateÚ	genconfigÚgenhashr†  Úencryptr‡  c                 óD   ‡ — t          ˆ fd„t          D ¦   «         ¦  «        S )zOcheck if object appears to be a :class:`~passlib.context.CryptContext` instancec              3   ó8   •K  — | ]}t          ‰|¦  «        V — Œd S rc   rŠ  r‹  s     €r`   r—   z#is_crypt_context.<locals>.<genexpr>¥  r�  rV   )r2  Ú_context_attrsr�  s   `r`   rH   rH   ¢  r�  rV   c                 ó:   — d| j         v ot          | dd¦  «        duS )z_check if handler provides the optional :ref:`rounds information <rounds-attributes>` attributesÚroundsÚ
min_roundsN©r„  Úgetattr©Úhandlers    r`   rI   rI   ¬  s+   € à˜Ô,Ð,ð =Ý�G˜\¨4Ñ0Ô0¸Ð<ð>rV   c                 ó:   — d| j         v ot          | dd¦  «        duS )z[check if handler provides the optional :ref:`salt information <salt-attributes>` attributesÚsaltÚmin_salt_sizeNr›  r�  s    r`   rJ   rJ   ±  s-   € à�gÔ*Ð*ð @Ý�G˜_¨dÑ3Ô3¸4Ð?ðArV   )NNFNNF)rÉ   rû   rc   )r  rÔ   N)r  rÔ   )r$  )Nr@  )±rz   Úpasslib.utils.compatr   Úbinasciir   r   r   Ú_BinAsciiErrorÚbase64r   r   Úcollections.abcr	   r
   ÚImportErrorÚcollectionsÚcodecsr   r+  Ú	functoolsr   r­   r   ÚloggingÚ	getLoggerrw   ÚlogÚmathrn  ÚsysÚrandomra  rÜ   rð   rq  rÝ   Ú	threadingÚtimeitÚtypesÚwarningsr   Úpasslib.utils.binaryr   r   r   r   r   r   r   r   r   r   r   r   r   Úpasslib.utils.decorr   r   r   r   r   Úpasslib.excr    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   Ú__all__rù   ÚmaxsizeÚmaxintr3   r4   r5   rU   rz  rß   r×   Úenvironr‚   ÚMAX_PASSWORD_SIZErp  r[   Ú	ParameterÚVAR_KEYWORDr†   ÚsetÚVAR_POSITIONALr„   r‹   rª   r»   r6   Ústr_consteqÚhmacrÈ   rÓ   r7   r9   rü   r   r  r  r8   r  r  r  r  r  r  r'  rô   r&  r)  r:   r0  r1  r;   r<   r=   r>   r>  rÑ   rC  rD  rE  rH  rK  rL  rU  r?   rS  Úpypy_version_infoÚLockrT  Úcrypt_needs_lockrN  rW  rJ  r²   rA   r@   Údefault_timerÚtimerrB   re  rs  rr  r]   ru  ÚSystemRandomrC   ÚRandomrD   rE   Ú
_52charsetrF   rŽ  rG   r—  rH   rI   rJ   r{   rV   r`   ú<module>rË     s¬  ðØ :Ð :ð (Ð 'Ð 'Ð 'Ð 'Ð 'à DÐ DÐ DÐ DÐ DÐ DÐ DÐ DÐ DÐ DØ 'Ð 'Ð 'Ð 'Ð 'Ð 'Ð 'Ð 'ð%Ø(Ð(Ð(Ð(Ð(Ð(Ø(Ð(Ð(Ð(Ð(Ð(Ð(øØð %ð %ð %à$Ð$Ð$Ð$Ð$Ð$Ø$Ð$Ð$Ð$Ð$Ð$Ð$Ð$ð%øøøð +Ð *Ð *Ð *Ð *Ð *Ø $Ð $Ð $Ð $Ð $Ð $Ø Ð Ð Ð Ø €€€Ø €€€Ð'�gÔ'¨Ñ1Ô1�Ø €€€Ø 	€	€	€	Ø 
€
€
€
Ø €€€Ø 	€	€	€	Ø	ð 	ð@ØÐÐÐÐøØð @ð @ð @Øˆ
Ø%?Ð"Ð"Ð"ð@øøøð ÐÐÐØ €€€Øð ØÐÐÐðØÐÐÐÐøØð ð ð à€I€I€Iðøøøð €€€Ø €€€Ø Ð Ð Ð Ð Ð ðð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ðð ð ð ð ð ð ð ð ð ð ð ð ð ð ?Ð >Ð >Ð >Ð >Ð >Ð >Ð >ðMð Mð Mð Mð Mð Mð Mð Mð Mð Mð Mð Mð Mð Mð Mð Mð Mð Mð Mð Mð Mð Mð Mð Mð Mð Mð Mð Mð Mð Mð Mð Mð Mð Mð Mð Mð Mð Mð'ð 'ð '€ð\ ˆ3ˆxˆtŒx sÐ:˜œ˜°´
¸AÑ>Ô>ÀÑDÑEÔE€ðð ð Ð ð   Ð)Ð ð ,Ð +Ð +Ð +Ð +Ð +ð €Ø
ˆ!ˆB‰%Œ%€Ø
ˆ!ˆC‰&Œ&€ð �C˜œ
ŸšÐ'BÑCÔCÐKÀtÑLÔLÐ ð&ð &ð &ð &ð &�Fñ &ô &ð &ð4 ð =ð Ô$Ô0€LØ�3˜ gÔ&7Ô&FÐGÑHÔH€Lð	=ð 	=ð 	=ð 	=ð=ð =ð =ð
 @EØ9>ðR(ð R(ð R(ð R(ðn3ð 3ð 3ð>8ð 8ð 8ð| €ð	à.Ð.Ð.Ð.Ð.Ð.Ð.øØð 	ð 	ð 	Ø€Dð	øøøð	:ð 	:ð 	:ð 	:ð}ð }ð }ð }ð@ ÐðNð Nð Nð Nð$ð $ð $ð, ð :ð,ð ,ð ,ð,ð ,ð ,ð ,ð ,Ð+Ð+Ð+Ð+Ð+Ð+Ð+ð&ð &ð &ð:ð :ð :ð €ˆÐGÑ HÔ HÐ HØ €ˆÐGÑ HÔ HÐ HðMð Mð Mð"ð "ð "ð.ð .ð .ð 
€Ø	
ˆˆ6‰Œ€ðð ð ð ðAð Að AðL (Ð Ø'×.Ò.¨wÑ7Ô7Ð ðBð Bð BðAð Að Að €Ø€qˆ�y„y€ð&ð &ð &ð
#1ð #1ð #1ð #1ðJ1ð 1ð 1ð 1ð4 ð 5ð5ð 5ð 5ð 5ð 5ð5ð 5ð 5ð 5ð €ˆðñ	ô 	ð 	ð* Ð ¨uÐ5Ñ5Ô5ð9ð 9ð 9ñ 6Ô5ð9ð ˆCÐ2×8Ò8Ñ:Ô:Ñ;Ô;€	ØˆSÐ6×<Ò<Ñ>Ô>Ñ?Ô?€
ØˆC��V�ÑÔ€	ðð ð ð ð4ð ð ðsØ%Ð%Ð%Ð%Ð%Ð%ð €IØ€Eð ð !�Tð !˜i¨3Ô+@ÐMÐMÒMÐMÀIÒMÐMÐMÐMÐMð *˜9œ>Ñ+Ô+Ðð  ÐÐð 	5Ð4Ð4Ð4Ð4Ð4Ø&˜;™=œ=ÐØ Ðð ˜˜%™œÐà
ð Pð
 #Ðð	ØˆF�7˜DÑ!Ô!Ð!Ð!øØð 	(ð 	(ð 	(à"'ÐÐÐð	ð ˆDøøøð+	ð +	ð +	ð +	ð^ #Ðð	ð 	ð 	ð 	øðG ð ð ð Ø€FØ€IØÐØÐØÐðð ð ð ð ðøøøðf €ˆ
ð ñ 	ô 	ð 	ð<,ð ,ð ,ð 	Ô€à€ðð ð ð,Ø€B„Jˆq�M„M€MØ€K€KøØð ð ð Ø€K€K€Kðøøøð=ð =ð =ð =ðB ð #Ø
ˆ&Ô
Ñ
Ô
€C€Cð ˆ&Œ-˜˜™	œ	Ñ
"Ô
"€Cð
&ð &ð &ð*)ð )ð )ð: D€
àÐ ¨uØ!RðTñ Tô Tà zð *ð *ð *ñTô Tð*ð2
€ð>ð >ð >ð

€ð>ð >ð >ð>ð >ð >ð
Að Að Að Að Asx   œ) ©=¼=Á?B Â	BÂBÂ"B' Â'B1Â0B1ÇG& Ç&G.Ç-G.Ì M= ÍM$ Í$M0Í-M0Í=NÎNÎ1O ÏOÏO