ó
    ´æ¹it7  ã                   óª   • S r SSKr\R                  " \5      rSSKrSSKJr  S/rS r	SSK
JrJrJr  \	" \5       " S S\5      5       r " S S	\5      rg)
z1passlib.ifc - abstract interfaces used by Passlibé    N)Údeprecated_methodÚPasswordHashc                 ó   ^ • U 4S jnU$ )z5class decorator that re-creates class using metaclassc                 ó�   >• T[        U 5      L a  U $ T" U R                  U R                  U R                  R	                  5       5      $ ©N)ÚtypeÚ__name__Ú	__bases__Ú__dict__Úcopy)ÚclsÚmetas    €Ú\/home/gothic/Documentos/geniubs/sat/app/api/venv/lib/python3.13/site-packages/passlib/ifc.pyÚbuilderÚ(recreate_with_metaclass.<locals>.builder   s8   ø€ Ø”4˜“9ÒØˆJÙ�C—L‘L #§-¡-°·±×1BÑ1BÓ1DÓEÐEó    © )r   r   s   ` r   Úrecreate_with_metaclassr      s   ø€ õFð €Nr   )ÚABCMetaÚabstractmethodÚabstractpropertyc                   ó  • \ rS rSrSrSrSrSrSr\	\
S 5       5       r\" SSS	S
9\	S 5       5       r\	\
S 5       5       r\	\
SS j5       5       r\	SS j5       r\	\
S 5       5       r\" SSS9\	S 5       5       r\" SSS9\	S 5       5       rSrSrg)r   é%   zìThis class describes an abstract interface which all password hashes
in Passlib adhere to. Under Python 2.6 and up, this is an actual
Abstract Base Class built using the :mod:`!abc` module.

See the Passlib docs for full documentation.
FNTc                 ó   • [        S5      e)a¨  
Hash secret, returning result.
Should handle generating salt, etc, and should return string
containing identifier, salt & other configuration, as well as digest.

:param \\*\\*settings_kwds:

    Pass in settings to customize configuration of resulting hash.

    .. deprecated:: 1.7

        Starting with Passlib 1.7, callers should no longer pass settings keywords
        (e.g. ``rounds`` or ``salt`` directly to :meth:`!hash`); should use
        ``.using(**settings).hash(secret)`` construction instead.

        Support will be removed in Passlib 2.0.

:param \\*\\*context_kwds:

    Specific algorithms may require context-specific information (such as the user login).
úmust be implemented by subclass©ÚNotImplementedError)r   ÚsecretÚsetting_and_context_kwdss      r   ÚhashÚPasswordHash.hashr   s   € ô6 "Ð"CÓDÐDr   z1.7z2.0z.hash())Ú
deprecatedÚremovedÚreplacementc                 ó&   • U R                   " U0 UD6$ )zç
Legacy alias for :meth:`hash`.

.. deprecated:: 1.7
    This method was renamed to :meth:`!hash` in version 1.7.
    This alias will be removed in version 2.0, and should only
    be used for compatibility with Passlib 1.3 - 1.6.
©r    )r   ÚargsÚkwdss      r   ÚencryptÚPasswordHash.encrypt�   s   € ð �xŠx˜Ð& Ñ&Ð&r   c                 ó   • [        S5      e)z.verify secret against hash, returns True/Falser   r   )r   r   r    Úcontext_kwdss       r   ÚverifyÚPasswordHash.verifyŸ   ó   € ô "Ð"CÓDÐDr   c                 ó   • [        S5      e)aœ  
Return another hasher object (typically a subclass of the current one),
which integrates the configuration options specified by ``kwds``.
This should *always* return a new object, even if no configuration options are changed.

.. todo::

    document which options are accepted.

:returns:
    typically returns a subclass for most hasher implementations.

.. todo::

    add this method to main documentation.
r   r   )r   Úrelaxedr(   s      r   ÚusingÚPasswordHash.using¨   s   € ô& "Ð"CÓDÐDr   c                 ó   • g)a˜  
check if hash's configuration is outside desired bounds,
or contains some other internal option which requires
updating the password hash.

:param hash:
    hash string to examine

:param secret:
    optional secret known to have verified against the provided hash.
    (this is used by some hashes to detect legacy algorithm mistakes).

:return:
    whether secret needs re-hashing.

.. versionadded:: 1.7
Fr   )r   r    r   s      r   Úneeds_updateÚPasswordHash.needs_updateÀ   s   € ð( r   c                 ó   • [        S5      e)z8check if hash belongs to this scheme, returns True/Falser   r   ©r   r    s     r   ÚidentifyÚPasswordHash.identifyÙ   r/   r   )r"   r#   c                 ó|   • U R                   (       a  [        S5      eU R                  " S0 UD6R                  S5      $ )am  
compile settings into a configuration string for genhash()

.. deprecated:: 1.7

    As of 1.7, this method is deprecated, and slated for complete removal in Passlib 2.0.

    For all known real-world uses, hashing a constant string
    should provide equivalent functionality.

    This deprecation may be reversed if a use-case presents itself in the mean time.
r   Ú r   )r,   r   r2   r    )r   Úsetting_kwdss     r   Ú	genconfigÚPasswordHash.genconfigß   s6   € ð$ ××Ü%Ð&GÓHÐHØ�yŠyÑ(˜<Ñ(×-Ñ-¨bÓ1Ð1r   c                 ó   • [        S5      e)a	  
generated hash for secret, using settings from config/hash string

.. deprecated:: 1.7

    As of 1.7, this method is deprecated, and slated for complete removal in Passlib 2.0.

    This deprecation may be reversed if a use-case presents itself in the mean time.
r   r   )r   r   ÚconfigÚcontexts       r   ÚgenhashÚPasswordHash.genhashõ   s   € ô "Ð"CÓDÐDr   r   )Fr   )r	   Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Úis_disabledÚtruncate_sizeÚtruncate_errorÚtruncate_verify_rejectÚclassmethodr   r    r   r)   r-   r2   r5   r9   r>   rC   r"   Ú__static_attributes__r   r   r   r   r   %   s&  † ñð( €Kð €Mð €Nð "Ðð6 ØñEó ó ðEñ6  %°ÀIÑNØñ	'ó ó Oð	'ð ØñEó ó ðEð ØóEó ó ðEð, óó ðð0 ØñEó ó ðEñ  %°Ñ7Øñ2ó ó 8ð2ñ(  %°Ñ7ØñEó ó 8ðEð@ ƒJr   c                   ó@   • \ rS rSrSrSr\SS j5       r\S 5       rSr	g)	ÚDisabledHashiD  zJ
extended disabled-hash methods; only need be present if .disabled = True
TNc                 ó$   • U R                  S5      $ )zƒ
return string representing a 'disabled' hash;
optionally including previously enabled hash
(this is up to the individual scheme).
r<   r&   r8   s     r   ÚdisableÚDisabledHash.disableK  s   € ð �x‰x˜‹|Ðr   c                 ó   • [        S5      e)zn
given a disabled-hash string,
extract previously-enabled hash if one is present,
otherwise raises ValueError
zcannot restore original hash)Ú
ValueErrorr8   s     r   ÚenableÚDisabledHash.enableU  s   € ô Ð7Ó8Ð8r   r   r   )
r	   rE   rF   rG   rH   rI   rM   rR   rV   rN   r   r   r   rP   rP   D  s4   † ñð €Kàóó ðð ñ9ó ó9r   rP   )rH   ÚloggingÚ	getLoggerr	   ÚlogÚsysÚpasslib.utils.decorr   Ú__all__r   Úabcr   r   r   Úobjectr   rP   r   r   r   Ú<module>r`      sm   ðÙ 7ó
 �g×'Ò'¨Ó1�Û 
õ 2ð ð€ò÷ :Ñ 9ñ ˜Ó!ôq�6ó qó "ðqô|9�<õ 9r   