+
    THi                         ^ RI t ^ RIHu Ht ^ RIHtHt ^ RIH	t	 RR.t
RtRt ! R R]P                  P                  ]P                  4      t ! R	 R]P                  4      tR# )
    N)consteqto_native_str)unicode_or_bytesunix_disabled	plaintextz*!s   *!c                   .  a a ] tR t^t oRtR tRtRt]! ]	! ]
4      4      tR]P                  9   d   RtMRt]RV 3R ll4       t]R 4       t]R 4       t]R 4       t]P*                  ! R	R
R7      ]RR l4       4       t]RR l4       t]R 4       tRtVtV ;t# )r   a  This class provides disabled password behavior for unix shadow files,
and follows the :ref:`password-hash-api`.

This class does not implement a hash, but instead matches the "disabled account"
strings found in ``/etc/shadow`` on most Unix variants. "encrypting" a password
will simply return the disabled account marker. It will reject all passwords,
no matter the hash string. The :meth:`~passlib.ifc.PasswordHash.hash`
method supports one optional keyword:

:type marker: str
:param marker:
    Optional marker string which overrides the platform default
    used to indicate a disabled account.

    If not specified, this will default to ``"*"`` on BSD systems,
    and use the Linux default ``"!"`` for all other platforms.
    (:attr:`!unix_disabled.default_marker` will contain the default value)

.. versionadded:: 1.6
    This class was added as a replacement for the now-removed
    :class:`!unix_fallback` class.
bsd*!c                   < \         SV `  ! R/ VB pVe-   V P                  V4      '       g   \        RV: 24      hWn        V# )Nzinvalid marker:  )superusingidentify
ValueErrordefault_marker)clsmarkerkwdssubcls	__class__s   &&, 7/usr/lib/python3/dist-packages/passlib/handlers/misc.pyr   unix_disabled.using7   sG    &&<<'' #3F:!>??$*!    c                    \        V\        4      '       d   \        pM=\        V\        4      '       d   \        pM \
        P                  P                  VR 4      hV'       * ;'       g    V^ ,          V9   # hash)
isinstancestr_MARKER_CHARSbytes_MARKER_BYTESuhexcExpectedStringError)r   r   starts   && r   r   unix_disabled.identify@   sX      dC  !Ee$$!E&&,,T6::x++47e++r   c                    \         P                  ! V4       V P                  V4      '       g    \         P                  P	                  V 4      hR # )F)r#   validate_secretr   r$   InvalidHashError)r   secretr   s   &&&r   verifyunix_disabled.verifyX   s7    
6"||D!!&&))#..r   c                $   V'       d8   \         P                  ! W4       V P                  ! R/ VB P                  V4      # \         P                  ! V4       V P
                  pV'       g   Q hV P                  V4      '       g   Q h\        VR R7      # )r   paramr   )r#   warn_hash_settings_deprecationr   r   r)   r   r   r   )r   r+   r   r   s   &&, r   r   unix_disabled.hash_   sr    --c899$t$))&11
6"##v||F####V844r   1.72.0
deprecatedremovedc                   V P                  V4      '       g    \        P                  P                  V 4      hV'       d$   \        P                  ! V4       \        VR R7      # Ve   V P                  VR7      p V P                  V4      # )configr/   r   )r   r#   r$   r*   r)   r   r   r   )r   r+   r9   r   s   &&&&r   genhashunix_disabled.genhashj   sk     ||F##&&))#..v& x88))6)*Cxxr   c                    V P                  R 4      pVeF   \        VRR7      pV P                  V4      '       d   V P                  V4      pV'       d	   W!,          pV# ) r   r/   )r   r   r   enable)r   r   outs   && r   disableunix_disabled.disablex   sM    hhrl V4D||D!!zz$'
r   c                    \        VR R7      pV P                   F?  pVP                  V4      '       g   K  V\        V4      R pV'       d   Vu # \	        R4      h	  \
        P                  P                  V 4      h)r   r/   Nzcannot restore original hash)r   _disable_prefixes
startswithlenr   r#   r$   r*   )r   r   prefixorigs   &&  r   r?   unix_disabled.enable   sh    T0++Fv&&CKM*K !?@@ , ff%%c**r   r   r:   N)__name__
__module____qualname____firstlineno____doc__namesetting_kwdscontext_kwdstupler   r    rD   sysplatformr   classmethodr   r   r,   r   r#   deprecated_methodr;   rA   r?   __static_attributes____classdictcell____classcell__)r   __classdict__s   @@r   r   r      s     . DLLc-01 
   , ,.   5 5 UE:
   ;
  	 	 + + +r   c                      a  ] tR t^t o RtR tRtRtRt]	R 4       t
]	RR l4       t]	RR l4       t]P                  ! RRR	7      ]	R
 4       4       t]P                  ! RRR	7      ]	RR l4       4       tRtV tR# )r   aR  This class stores passwords in plaintext, and follows the :ref:`password-hash-api`.

The :meth:`~passlib.ifc.PasswordHash.hash`, :meth:`~passlib.ifc.PasswordHash.genhash`, and :meth:`~passlib.ifc.PasswordHash.verify` methods all require the
following additional contextual keyword:

:type encoding: str
:param encoding:
    This controls the character encoding to use (defaults to ``utf-8``).

    This encoding will be used to encode :class:`!str` passwords
    under Python 2, and decode :class:`!bytes` hashes under Python 3.

.. versionchanged:: 1.6
    The ``encoding`` keyword was added.
zutf-8c                r    \        V\        4      '       d   R # \        P                  P	                  VR4      h)Tr   )r   r   r#   r$   r%   )r   r   s   &&r   r   plaintext.identify   s*    d,--ff((v66r   Nc                n    \         P                  ! V4       V'       g   V P                  p\        WR 4      # )r+   )r#   r)   default_encodingr   )r   r+   encodings   &&&r   r   plaintext.hash   s+    
6"++HVx88r   c                    V'       g   V P                   p\        W#R 4      pV P                  V4      '       g    \        P                  P                  V 4      h\        V P                  W4      V4      # r   )r`   r   r   r#   r$   r*   r   r   )r   r+   r   ra   s   &&&&r   r,   plaintext.verify   sV    ++HTV4||D!!&&))#..sxx1488r   r3   r4   r5   c                $    V P                  R 4      # )r>   r   )r   s   &r   	genconfigplaintext.genconfig   s     xx|r   c                    V P                  V4      '       g    \        P                  P                  V 4      hV P	                  WR 7      # )ra   )r   r#   r$   r*   r   )r   r+   r9   ra   s   &&&&r   r;   plaintext.genhash   s9     ||F##&&))#..xxx22r   r   ri   rJ   )rK   rL   rM   rN   rO   rP   rQ   rR   r`   rV   r   r   r,   r#   rW   rf   r;   rX   rY   )r[   s   @r   r   r      s     $ DL L7 7
 9 9 9 9 UE:  ; UE:3  ;3r   )rT   passlib.utils.handlersutilshandlersr#   passlib.utilsr   r   passlib.utils.compatr   __all__r    r"   ifcDisabledHashMinimalHandlerr   r   r   r   r   <module>rt      sb    
 # # 0 1 
 }+BFF''):): }+@93!! 93r   