+
    THij                      a  0 t $ R t^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	t	^ RI
t
^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHtHt ^ RIHt ^ RIHtHt ^ RIHtHtHtHtHtHtHtH t H!t!H"t"H#t#H$t$H%t% ^ RI&H't'H(t(H)t)H*t*H+t+ ^ RI,H-t-H.t.H/t/H0t0H1t1 . R	NR
NRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNR NR!NR"NR#NR$NR%NR&NR'NR(NR)NR*NR+NR,NR-NR.NR/NR0NR1NR2NR3Nt2]3! ]Ph                  ! ]Pj                  4      R4,           4      t6. RzOt7R5R6.t8R7t9R8t:R9t;]3! ]	Px                  P{                  R:4      ;'       g    R;4      t> ! R< R=4      t?]P                  P                  tB]B]P                  P                  0tDR> tER{R@ ltFRA tGRB tHR|RC ltIR}RD ltJRE tKRF tLRG tM]'! ]LRH4       ]'! ]MRI4       RJ RK ltNRL RM ltORN RO ltPRPtQRQtRR~RR RS lltSRT RU ltTRVtU]UP                  RW4      tWRX RY ltXRZ R[ ltY^tZR\t[R] R^ lt\RR_ R` llt]RRa Rb llt^RRc Rd llt_].! ReRfRg7      RRh l4       t`]a! . RO4      tb]a! . RO4      tc]a! R8Ri.4      tdRRj Rk llteR?tf]P                  th]hti ]	P                  ! ^4       RltkR~Rm ltm]k'       d   ]
P                  ! 4       toRn]pR(&   M]
P                  ! ]m! 4       4      toRo trRp tsRqtt].! RfRrRsRt7      ^
]t3Ru l4       tuRtvRv twRtxRw tyRx tzRy t{R#   ]l d    R?tk Lui ; i)z4passlib.utils -- helpers for writing password hashes)annotationsN)IterableSequence)AnyStr)ExpectedStringErrorExpectedTypeError)
AB64_CHARSBASE64_CHARSBCRYPT_CHARSHASH64_CHARSBase64EngineLazyBase64Engineab64_decodeab64_encodeb64s_decodeb64s_encodebcrypt64h64h64big)add_docget_method_function
join_bytesjoin_unicodeunicode_or_bytes)classpropertydeprecated_functiondeprecated_methodhybrid_methodmemoized_propertyr   r	   r
   r   r   r   r   r   r   r   r   r   consteqr   generate_passwordgetrandbytes
getrandstrr   r   	has_crypthas_rounds_infohas_salt_infor   is_ascii_safeis_crypt_contextis_crypt_handleris_same_codecr   r   r   render_bytesrngrounds_cost_values
safe_cryptsaslprepsys_bits
test_crypttickto_bytesto_native_str
to_unicodeunix_crypt_schemes	xor_bytesg      ?linearlog2      PASSLIB_MAX_PASSWORD_SIZEi   c                  P    ] tR t^}tRtR tR tR tR tR t	R t
R R	 ltR
 tRtR# )SequenceMixinzw
helper which lets result object act like a fixed-length sequence.
subclass just needs to provide :meth:`_as_tuple()`.
c                	    \        R 4      h)zimplement in subclass)NotImplementedErrorselfs   &8/usr/lib/python3/dist-packages/passlib/utils/__init__.py	_as_tupleSequenceMixin._as_tuple   s    !"9::r9   c                	4    \        V P                  4       4      # N)reprrD   rA   s   &rC   __repr__SequenceMixin.__repr__       DNN$%%r9   c                	0    V P                  4       V,          # rG   rD   )rB   idxs   &&rC   __getitem__SequenceMixin.__getitem__   s    ~~$$r9   c                	4    \        V P                  4       4      # rG   )iterrD   rA   s   &rC   __iter__SequenceMixin.__iter__   rK   r9   c                	4    \        V P                  4       4      # rG   )lenrD   rA   s   &rC   __len__SequenceMixin.__len__   s    4>>#$$r9   c                	(    V P                  4       V8H  # rG   rM   rB   others   &&rC   __eq__SequenceMixin.__eq__   s    ~~5((r9   c                   V ^8  d   QhRR/# )   returnint )formats   "rC   __annotate__SequenceMixin.__annotate__   s     & &# &r9   c                	4    \        V P                  4       4      # rG   )hashrD   rA   s   &rC   __hash__SequenceMixin.__hash__   rK   r9   c                	.    V P                  V4      '       * # rG   )r\   rZ   s   &&rC   __ne__SequenceMixin.__ne__   s    ;;u%%%r9   rb   N)__name__
__module____qualname____firstlineno____doc__rD   rI   rO   rS   rW   r\   rh   rk   __static_attributes__rb   r9   rC   r>   r>   }   s/    
;&%&%)&&r9   r>   c                   \         P                  ! \        V 4      4      P                  pV'       g   R# VP	                  V4      pV'       d   VP
                  \        9  d   R# V\        V4      R,          ,          P
                  \        8H  # )z*test if function accepts specified keywordFT)	inspect	signaturer   
parametersgetkind_VAR_ANY_SETlist_VAR_KEYWORD)funckeyparamsargs   &&  rC   accepts_keywordr      sa    2489DDF
**S/C
sxx|+$v,r"#((L88r9   Fc                  a \        V\        4      '       d   V.p\        V P                  4      pV'       dN   \        V\        4      '       d   V.pV F.  oV'       d
   SV9   d   K  SV9   g   K  VP	                  S4       K0  	  V'       Ed   V EF  o\
        ;QJ d    V3R lV 4       F  '       g   K   RM	  RM! V3R lV 4       4      '       d   KF  V'       dR   \        V4       F6  w  r\        SV	4      '       d    MV'       g   K#  \        W4      '       g   K6   Ms	  \        V4      pMeV'       d\   \        \        V4      4       F@  w  r\        W4      '       g   K  \        V4      V
,
          pWx^,
          ,          V	8X  g   Q h M	  ^ pM^ pVP                  VS4       EK  	  V'       g   \        V4      V n        R# R# )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  <   <"   T F  p\        VS4      x  K  	  R # 5irG   )
issubclass).0basemixins   & rC   	<genexpr>'update_mixin_classes.<locals>.<genexpr>   s     =ut:dE**u   TFN)
isinstancetyper{   	__bases__removeany	enumerater   rV   reversedinserttuple)targetaddr   appendbeforeafterdryrunbasesrN   r   end_idxr   s   &&&&&&&    @rC   update_mixin_classesr      sa   > #te!!"E fd##XFEu|~U#	  sEs=u=sss=u=== !*5!1IC!%..v*T":": "2 e*C%.x%?MG!$..!%j72$1W~555 &@ C  LLe$? D  < r9   c              #    "   V^8  d   \        R4      h\        V \        4      '       d(   \        V 4      p^ pW28  d   W1,           pWV x  TpK  R# \        V \        4      '       dK   \        V 4      p \        P                  ! WQ4      p \        V4      p\        P                  ! T3T4      x  K?  \        R4      h  \         d     R# i ; i5i)z0
split iterable into chunks of <size> elements.
zsize must be positive integerzsource must be iterableN)
ValueErrorr   r   rV   r   rR   	itertoolsislicenextStopIterationchain	TypeError)sourcesizeendinitr	chunk_itrfirsts   &&      rC   batchr     s      ax899&(##&kgA1+A  
FH	%	%6l!((3IY //5(I66122	 ! s*   BCB= 'C=CCCCc                
   \        V 4      \        V4      Jd   \        h\        V \        4      '       d   V P	                  4       MT p \        V\        4      '       d   VP	                  4       MTp\
        P                  ! W4      # rG   )r   r   r   strencodehmaccompare_digestleftrights   &&rC   r   r     sZ    Dze$&tS114;;=tD(44ELLN%Et++r9   c                    V P                  4       p V P                  V4      '       d   V RR p V '       g   . # V P                  V4       Uu. uF  q"P                  4       NK  	  up# u upi )zJsplit comma-separated string into list of elements,
stripping whitespace.
Nrt   )stripendswithsplit)r   sepelems   && rC   
splitcommar   (  sX     \\^Fs	%+\\#%67%6TJJL%6777s   
A%c                   \        V \        4      '       g   \        R\        V 4       24      hRP	                  R V  4       4      p\
        P                  ! RV4      pV'       g   \        # \        P                  pV! V^ ,          4      '       d9   V! VR,          4      '       g   \        RV,           4      h\        P                  pMTp\        P                  R3\        P                  R3\        P                  R3\        P                  R	3\        P                  R	3\        P                  R	3\        P                   R
3\        P"                  R3\        P$                  R3\        P&                  R3\        P(                  R3VR3.pV Fr  p\        P*                  ! V4      '       d   Q R4       h\        P,                  ! V4      '       d   Q R4       hV F#  w  rxV! V4      '       g   K  \        V RV 24      h	  Kt  	  V# )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 string, not r:   c              3     "   T FG  p\         P                  ! V4      '       d   K!  \         P                  ! V4      '       d   \        MTx  KI  	  R # 5irG   )
stringprepin_table_b1in_table_c12_USPACE)r   cs   & rC   r   saslprep.<locals>.<genexpr>f  s<      A%%a( 	5:**1--14s   AAANFKCzmalformed bidi sequence in z$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 z$failed to strip B.1 in mapping stagez(failed to replace C.1.2 in mapping stager;   rt   )r   r   r   r   joinunicodedata	normalize_UEMPTYr   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_c9r   r   )	r   paramdatais_ral_charis_forbidden_bidi_char
forbidden_r   r}   err_msgs	   &&       rC   r.   r.   4  s   X fc""4T&\NCDD
 77  D   .D ((K4748$$:UBCC!+!7!7 "- 
		!GH		$	$&HI			!GH			!EF			!EF			!EF			!@A			!DE			!DE""?	
 
		!BC	!?@!J$ ))!,,T.TT,**1-- 	
6	
- (MDAww G9AeW!566 (  Kr9   c                    \        V \        4      '       d   V P                  R4      p T \        ;QJ d    . R V 4       F  NK  	  5M! R V 4       4      ,          pVP	                  R4      # )at  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  t   "   T F.  p\        V\        4      '       d   VP                  R 4      MTx  K0  	  R# 5i)r   N)r   bytesdecode)r   r   s   & rC   r   render_bytes.<locals>.<genexpr>  s-      LPSC!7!7

9S@Ds   68)r   r   r   r   r   )r   argsresults   &* rC   r*   r*     sa      &%  y)ee LPee LP  F ==##r9   c                .    \         P                  V R 4      # big)ra   
from_bytesvalues   &rC   bytes_to_intr     s    >>%''r9   c                &    V P                  VR 4      # r   )r2   )r   counts   &&rC   int_to_bytesr     s    >>%''r9   z/decode byte string as single big-endian integerz/encode integer as single big-endian byte stringc               $    V ^8  d   QhRRRRRR/# )r_   r   r   r   r`   rb   )rc   s   "rC   rd   rd     s&     M ME M% ME Mr9   c                ^    \        \        V 4      \        V4      ,          \        V 4      4      # )z;Perform bitwise-xor of two byte strings (must be same size))r   r   rV   r   s   &&rC   r6   r6     s"    T*\%-@@#d)LLr9   c               $    V ^8  d   QhRRRRRR/# )r_   r   r   r   ra   r`   rb   )rc   s   "rC   rd   rd     s!     " "& " " "r9   c                X    ^V^,
          \        V 4      ,          ,           pW,          RV # )z=
repeat or truncate <source> string, so it has length <size>
N)rV   r   r   mults   && rC   repeat_stringr     s*     qS[((DM5D!!r9   c               $    V ^8  d   QhRRRRRR/# )r_   r   r   r   ra   r`   rb   )rc   s   "rC   rd   rd     s!     . .u .C .E .r9   c                f    ^V^,
          \        V 4      ,          ,           p\        W,          V4      # )zF
variant of repeat_string() which truncates to nearest UTF8 boundary.
)rV   utf8_truncater   s   && rC   utf8_repeat_stringr     s*     qS[((D--r9        c               (    V ^8  d   QhRRRRRRRR/# )r_   r   r   r   ra   padzAnyStr | Noner`   rb   )rc   s   "rC   rd   rd     s(      V 3 ] f r9   c                    Vf#   \        V \        4      '       d   \        M\        p\	        V 4      pW8  d   WW,
          ,          ,           # V RV # )z>right-pad or truncate <source> string, so it has length <size>N)r   r   _UNULL_BNULLrV   )r   r   r   lengths   &&& rC   right_pad_stringr     sD    
{"63//fV[F}t}---%4=r9   c               $    V ^8  d   QhRRRRRR/# )r_   r   r   indexra   r`   rb   )rc   s   "rC   rd   rd     s!     = =% = = =r9   c                j  a a \        S \        4      '       g   \        S \        R4      h\        S 4      pV^ 8  d   \	        ^ W,           4      pW8  d   S # \        V^,           V4      pW8  d"   S V,          ^,          ^8w  d   MV^,          pK'  W8X  g   Q hS RV oVV 3R lpV! 4       '       g   Q hS# )ai  
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.
r   Nc                    <  SP                  R 4      p T P                  SP                  R 4      4      '       g   Q hR#   \         d     R# i ; i)utf-8T)r   UnicodeDecodeError
startswith)textr   r   s    rC   sanity_check#utf8_truncate.<locals>.sanity_check  sM    	==)D v}}W56666 " 		s   > AA)r   r   r   rV   maxmin)r   r  r   r	  r   s   f&  @rC   r   r     s    * fe$$x88 f+CqyAu{#| eai
C +%=44'
|| FU^F
 >>>Mr9   s	    
 aA:#!asciic                    V ^8  d   QhRRRR/# )r_   codecr   r`   boolrb   )rc   s   "rC   rd   rd   1  s     B B# B$ Br9   c                :    \         P                  V 4      \        8H  # )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)r  s   &rC   is_ascii_codecr  1  s    %%e,0AAAr9   c               $    V ^8  d   QhRRRRRR/# )r_   r   r   r   r`   r  rb   )rc   s   "rC   rd   rd   6  s&     A A AC AD Ar9   c                    W8X  d   R# V '       d	   V'       g   R# \         P                  ! V 4      P                  \         P                  ! V4      P                  8H  # )z3Check if two codec names are aliases for same codecTF)codecslookupnamer   s   &&rC   r)   r)   6  s;    }U==##v}}U';'@'@@@r9      c                    V ^8  d   QhRRRR/# )r_   r   r   r`   r  rb   )rc   s   "rC   rd   rd   C  s     & && &T &r9   c                   a \        V \        4      '       d   \        M\        o\        ;QJ d    V3R lV  4       F  '       d   K   R# 	  R# ! V3R lV  4       4      # )z<Check if string (bytes or unicode) contains only 7-bit asciic              3  ,   <"   T F	  qS8  x  K  	  R # 5irG   rb   )r   r   rs   & rC   r    is_ascii_safe.<locals>.<genexpr>F  s     %f1ufs   FT)r   r   _B80_U80all)r   r  s   &@rC   r&   r&   C  s?    65))tA3%f%33%3%3%f%%%r9   c          
     ,    V ^8  d   QhRRRRRRRRRR	/# )
r_   r   zstr | bytesencodingr   r   source_encodingz
str | Noner`   r   rb   )rc   s   "rC   rd   rd   I  s:     &- &-&-&- &-  	&-
 &-r9   c                   V'       g   Q h\        V \        4      '       d<   V'       d2   \        W14      '       g!   V P                  V4      P	                  V4      # V # \        V \
        4      '       d   V P	                  V4      # \        W4      h)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 str 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   r$  r   r%  s   &&&&rC   r2   r2   I  sk    > O8&%  =#K#K==188BB&#}}X&&
f
,,r9   c                    V ^8  d   QhRRRR/# r_   r   r   r`   r   rb   )rc   s   "rC   rd   rd   r  s     - -v -3 -r9   c                    V'       g   Q h\        V \        4      '       d   V # \        V \        4      '       d   V P                  V4      # \	        W4      h)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 str or bytes.

:returns:
    * returns unicode strings unchanged.
    * returns bytes strings decoded using *encoding*
)r   r   r   r   r   r   r$  r   s   &&&rC   r4   r4   r  sD    $ O8&#&%  }}X&&
f
,,r9   c                    V ^8  d   QhRRRR/# r(  rb   )rc   s   "rC   rd   rd     s     - -& -c -r9   c                    \        V \        4      '       d   V P                  V4      # \        V \        4      '       d   V # \	        W4      h)a#  Take in str or bytes, returns str.
leaves str alone, decodes bytes using specified encoding.

:param source: source unicode or bytes string
:param encoding: encoding to use when encoding unicode or decoding bytes
:param param: optional name of variable/noun to reference when raising errors
)r   r   r   r   r   r*  s   &&&rC   r3   r3     s=     &%  }}X&&&#
f
,,r9   z1.6z1.7)
deprecatedremovedc                    \        WRR7      # )z'deprecated, use to_native_str() insteadrg   )r   )r3   )r   r$  s   &&rC   to_hash_strr0    s     88r9   nonec               $    V ^8  d   QhRRRRRR/# )r_   r   zstr | bytes | Noner1  zbool | Noner`   rb   )rc   s   "rC   rd   rd     s$      %0r9   c                @   VR9   g   Q h\        V \        4      '       dX   V P                  4       P                  4       pV\        9   d   R# V\
        9   d   R# V\        9   d   V# \        RV RV : 24      h\        V \        4      '       d   V # V f   V# \        V 4      # )zP
helper to convert value to boolean.
recognizes strings such as "true", "false"
TFzunrecognized z value: )TFN)	r   r   lowerr   	_true_set
_false_set	_none_setr   r  )r   r1  r   cleans   &&& rC   as_boolr9    s     &&&&%)**##%IJIK=xyABB%};r9   Tc           
     V   ^ RI Hp \        V R4      '       d$   \        V R4      '       d    V P                  4       p RP                  T \        \        R4      '       d   \        P                  ! 4       MR\        \        4       4      \        P                  ! 4       \        4       \        '       d&   \        P                  ! ^ 4      P                  R4      M^ 4      p\!        V! VP#                  R4      4      P%                  4       ^4      #   \         d    T P                  R	4      p  Li ; i)
z.generate prng seed value from system resources)sha512getstategetrandbitsz{} {} {} {:.15f} {:.15f} {}getpidNr   r  i   )hashlibr;  hasattrr<  r@   r=  rc   osr>  idobjecttimer1   has_urandomurandomr   ra   r   	hexdigest)r   r;  r  s   &  rC   genseedrH    s    uj!!ge]&C&C	/NN$E
 )// r8,,		$ 	68		,7K

2i(QD  vdkk'*+557<<) # 	/ %%g.E	/s   D	 	D('D(zrandom.Randomc                P   a a S'       g   \         # VV 3R lp\        V! 4       4      # )z]return byte-string containing *count* number of randomly generated bytes, using specified rngc               3     <"   SP                  S^,          4      p ^ pVS8  d    V ^,          x  V ^,          p V^,          pK&  R# 5i)   N)r=  )r   r   r   r+   s     rC   helpergetrandbytes.<locals>.helper
  sE     
+%i$,aKEFA s   AA)_BEMPTYr   )r+   r   rL  s   ff rC   r!   r!     s       ?r9   c                  a aaa S^ 8  d   \        R4      h\        S4      oS^ 8X  d   \        R4      hS^8X  d
   SS,          # VVVV 3R lp\        S\        4      '       d   RP	                  V! 4       4      # \        V! 4       4      # )z|return string containing *count* number of chars/bytes, whose elements are drawn from specified charset, using specified rngzcount must be >= 0zalphabet must not be emptyc               3     <"   SP                  ^ SS,          4      p ^ pVS8  d'   SV S,          ,          x  V S,          p V^,          pK-  R# 5i)    N)	randrange)r   r   charsetr   lettersr+   s     rC   rL  getrandstr.<locals>.helper%  sM     a%0%i%'/**gEFA s   AAr:   )r   rV   r   r   r   r   )r+   rS  r   rL  rT  s   fff @rC   r"   r"     s{     qy-..'lG!|566!|  '3wwvx  ?r9   42346789ABCDEFGHJKMNPQRTUVWXYZabcdefghjkmnpqrstuvwxyzz2.0z/passlib.pwd.genword() / passlib.pwd.genphrase())r-  r.  replacementc                "    \        \        W4      # )aG  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.
)r"   r+   )r   rS  s   &&rC   r    r    6  s    2 c7))r9   c                   a  \         ;QJ d#    V 3R l\         4       F  '       d   K   R# 	  R# ! V 3R l\         4       4      # )z4check if object follows the :ref:`password-hash-api`c              3  <   <"   T F  p\        SV4      x  K  	  R # 5irG   r@  r   r  objs   & rC   r   #is_crypt_handler.<locals>.<genexpr>_       =ndwsD!!nr   FT)r"  _handler_attrsr]  s   frC   r(   r(   \  .     3=n=33=3=3=n===r9   c                   a  \         ;QJ d#    V 3R l\         4       F  '       d   K   R# 	  R# ! V 3R l\         4       4      # )zOcheck if object appears to be a :class:`~passlib.context.CryptContext` instancec              3  <   <"   T F  p\        SV4      x  K  	  R # 5irG   r[  r\  s   & rC   r   #is_crypt_context.<locals>.<genexpr>o  r_  r   FT)r"  _context_attrsra  s   frC   r'   r'   l  rb  r9   c                N    RV P                   9   ;'       d    \        V RR4      RJ# )z_check if handler provides the optional :ref:`rounds information <rounds-attributes>` attributesrounds
min_roundsNsetting_kwdsgetattrhandlers   &rC   r$   r$   x  s2     	G((( 	= 	=G\40<r9   c                N    RV P                   9   ;'       d    \        V RR4      RJ# )z[check if handler provides the optional :ref:`salt information <salt-attributes>` attributessaltmin_salt_sizeNrj  rm  s   &rC   r%   r%     s4     	'&&& 	@ 	@G_d34?r9   )sha512_cryptsha256_crypt
sha1_cryptbcrypt	md5_crypt
bsdi_crypt	des_crypt)NNFNNF),r   rG   )r  r   N)r  r   )r  )truetyesyon1enableenabled)falsefnor   off0disabledisabled)Nboolean)r  rk  context_kwdsverifyrg   identify)needs_update	genconfiggenhashr  encryptr  )|__conditional_annotations__rq   
__future__r   r  r   ru   r   mathrA  randomr   sysrD  timeitr   collections.abcr   r   typingr   passlib.excr   r   passlib.utils.binaryr   r	   r
   r   r   r   r   r   r   r   r   r   r   passlib.utils.compatr   r   r   r   r   passlib.utils.decorr   r   r   r   r   __all__ra   r8   maxsizer/   r5   r,   rN  r   r   environrx   MAX_PASSWORD_SIZEr>   	ParameterVAR_KEYWORDr|   VAR_POSITIONALrz   r   r   r   r   r   r.   r*   r   r   r6   r   r   r   r   r   r   r  r   r  r  r)   r   r!  r&   r2   r4   r3   r0  setr5  r6  r7  r9  r#   default_timertimerr1   rF  rE  r@   rH  SystemRandomr+   __annotations__Randomr!   r"   
_52charsetr    r`  r(   rf  r'   r$   r%   )r  s   @rC   <module>r     s   : "      	   
    .  >      ,,, , 	,
 , , , , , , , , , , ,  !," #,$ 
%,& ',( ),* +,, -,. /,0 1,2 3,4 5,6 7,8 9,: ;,< =,> ?,@ 
A,B C,D E,F G,H I,J K,L M,N O,P Q,R S,T U,V W,^ tyy%+,	  ' 


 

'BCKKtL & &D   ,,g//>>?	9S(l34,	8nb$0(( G H G HM
". 
	=@ ( '..w7 B
A &&-R-6- u59 69
 IJ	MN
V	0 	 	JJqMK
=> ,,.C. --	
"C0: D
 A
 z *
*.>>a  Ks    K 	K*)K*