+
    THir                        a  R t0 t ^ RIHu Ht ^ RIHt ^ RIHt . t	] ^ k Rt
 ! R R]P                  ]P                  ]P                  ]P                  4      tR# )    N)compile_hmac)h64    c                      a  ] tR t^	t o RtR tRtRt^t]	P                  t^t^@t]	P                  tRt^tRtRt]R 4       tRR ltRt]R 4       tR	 t. ROtR
tV tR# )
sha1_crypta  This class implements the SHA1-Crypt password hash, and follows the :ref:`password-hash-api`.

It supports a variable-length salt, and a variable number of rounds.

The :meth:`~passlib.ifc.PasswordHash.using` method accepts the following optional keywords:

:type salt: str
:param salt:
    Optional salt string.
    If not specified, an 8 character one will be autogenerated (this is recommended).
    If specified, it must be 0-64 characters, drawn from the regexp range ``[./0-9A-Za-z]``.

:type salt_size: int
:param salt_size:
    Optional number of bytes to use when autogenerating new salts.
    Defaults to 8 bytes, but can be any value between 0 and 64.

:type rounds: int
:param rounds:
    Optional number of rounds to use.
    Defaults to 480000, must be between 1 and 4294967295, inclusive.

:type relaxed: bool
:param relaxed:
    By default, providing an invalid value for one of the other
    keywords will result in a :exc:`ValueError`. If ``relaxed=True``,
    and the error can be corrected, a :exc:`~passlib.exc.PasslibHashWarning`
    will be issued instead. Correctable errors include ``rounds``
    that are too small or too large, and ``salt`` strings that are too long.

    .. versionadded:: 1.6
$sha1$i S l    linearc                `    \         P                  ! WP                  V R 7      w  r#pV ! W#VR7      # ))handler)roundssaltchecksum)uh	parse_mc3ident)clshashr   r   chks   &&   =/usr/lib/python3/dist-packages/passlib/handlers/sha1_crypt.pyfrom_stringsha1_crypt.from_stringB   s(    LLyy#Fc&c::    c                    V'       d   R MV P                   p\        P                  ! V P                  V P                  V P
                  V4      # )N)r   r   
render_mc3r   r   r   )selfconfigr   s   && r   	to_stringsha1_crypt.to_stringG   s0    d$--}}TZZdiiEEr   c                <    V P                  V P                  4       R # )T)_set_calc_checksum_backend_calc_checksum_builtin)r   s   &r   _load_backend_builtin sha1_crypt._load_backend_builtinP   s    &&s'A'ABr   c                   \        V\        4      '       d   VP                  R 4      p\        V9   d    \        P
                  P                  V 4      hV P                  pV P                   RV 2P                  R4      p\        RV4      p\        V4       F  pV! V4      pK  	  \        P                  ! W0P                  4      P                  R4      # )zutf-8r   asciisha1)
isinstancestrencode_BNULLr   excNullPasswordErrorr   r   r   ranger   encode_transposed_bytes_chk_offsetsdecode)r   secretr   result
keyed_hmac_s   &&    r   r!   !sha1_crypt._calc_checksum_builtinU   s    fc""]]7+FV&&**400YYKvfX.66w?!&&1
vA'F **63D3DELLWUUr    N)r   	salt_sizer   )F)builtin)      r                        
   	                     r         )__name__
__module____qualname____firstlineno____doc__namesetting_kwdsr   checksum_sizer   HASH64_CHARSchecksum_charsdefault_salt_sizemax_salt_size
salt_charsdefault_rounds
min_rounds
max_roundsrounds_costclassmethodr   r   backendsr"   r!   r/   __static_attributes____classdictcell__)__classdict__s   @r   r   r   	   s     D D2LEM__N MJ NJJK; ;F H
  VLr   r   c                V    V ^8  d   Qh/ ^ \         9   d   \        \        ,          ;R&   # )r9   __all__)__conditional_annotations__listr(   )formats   "r   __annotate__rg      s     # #  c 	 $r   )rd   passlib.utils.handlersutilshandlersr   passlib.crypto.digestr   passlib.utils.binaryr   rc   r*   HasManyBackends	HasRoundsHasSaltGenericHandlerr   rg   )rd   s   @r   <module>rq      sK    # # . $ 	pLLJJ	pr   