+
    iBJ                        R t ^ RIHtHt ^ RIHtHt ^ RIt]P                  ! ]	4      t
^ RIHt ^ RIHtHt ^ RIHtHtHtHt ^ RIHt ^ RIHu Ht . R&Ot ! R R]P8                  ]P:                  ]P<                  ]P>                  4      t RR]	3R lt!]!! R^R]! R4      R7      t"]!! R^ R4      t#]!! R^@R4      t$]PJ                  ! R]"RRRR7      t&]PJ                  ! R]#RRRR7      t']PJ                  ! R]$RRRR7      t(R t) ! R! R]P8                  ]P:                  ]P<                  ]P>                  4      t* ! R" R	]P8                  ]PV                  ]P>                  4      t, ! R# R$]P:                  ]P<                  ]P>                  4      t- ! R% R
]P8                  ]P:                  ]P<                  ]P>                  4      t.R# )'z,passlib.handlers.pbkdf - PBKDF2 based hashes)hexlify	unhexlify)	b64encode	b64decodeN)
to_unicode)ab64_decodeab64_encode)str_to_basciiuuascii_to_strunicode)pbkdf2_hmaccta_pbkdf2_sha1dlitz_pbkdf2_sha1grub_pbkdf2_sha512c                   x   a  ] tR t^t o RtR
t]P                  t^t	Rt
Rt^tRtRtRt]R 4       tR tR tR	tV tR# )Pbkdf2DigestHandlerz1base class for various pbkdf2_{digest} algorithms   N    linearc                    \         P                  ! WP                  V R 7      w  r#p\        VP	                  R4      4      pV'       d   \        VP	                  R4      4      pV ! W#VR7      # ))handlerasciiroundssaltchecksum)uh	parse_mc3identr   encodeclshashr   r   chks   &&   U/var/www/html/photoedit/myenv/lib/python3.14/site-packages/passlib/handlers/pbkdf2.pyfrom_stringPbkdf2DigestHandler.from_string?   sQ    LLyy#Fc4;;w/0cjj12C&c::    c                    \        V P                  4      P                  R 4      p\        V P                  4      P                  R 4      p\        P
                  ! V P                  V P                  W4      # r   )r   r   decoder   r   
render_mc3r   r   selfr   r$   s   &  r%   	to_stringPbkdf2DigestHandler.to_stringG   sO    499%,,W5$--(//8}}TZZd@@r(   c                n    \        V P                  WP                  V P                  V P                  4      # )N)r   _digestr   r   checksum_sizer.   secrets   &&r%   _calc_checksum"Pbkdf2DigestHandler._calc_checksumL   s%    4<<DKKI[I[\\r(    r   	salt_sizer   )__name__
__module____qualname____firstlineno____doc__setting_kwdsr   HASH64_CHARSchecksum_charsdefault_salt_sizemax_salt_sizedefault_rounds
min_rounds
max_roundsrounds_costr2   classmethodr&   r/   r6   __static_attributes____classdictcell____classdict__s   @r%   r   r      sh     ; 3L__N M NJJK G ; ;A
] ]r(   r   i.  c                
   RV ,           pVf   \        R4      V 3,          p\        p\        WV3\        VVVV VVV^,          ^,           ^,          R\        V P	                  4       VP
                  VR7      ,          R7      4      # )z;create new Pbkdf2DigestHandler subclass for a specific hashpbkdf2_z$pbkdf2-%s$a$  This class implements a generic ``PBKDF2-HMAC-%(digest)s``-based 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: bytes
    :param salt:
        Optional salt bytes.
        If specified, the length must be between 0-1024 bytes.
        If not specified, a %(dsc)d byte salt will be autogenerated (this is recommended).

    :type salt_size: int
    :param salt_size:
        Optional number of bytes to use when autogenerating new salts.
        Defaults to %(dsc)d bytes, but can be any value between 0 and 1024.

    :type rounds: int
    :param rounds:
        Optional number of rounds to use.
        Defaults to %(dr)d, but must be within ``range(1,1<<32)``.

    :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
    )digestdscdr)r<   namer   r2   rE   r3   encoded_checksum_sizer?   )r
   r   typedictupperrC   )	hash_namedigest_sizer   r   modulerS   bases   &&&&&  r%   create_pbkdf2_hashr\   P   s    y D}- I</Dgt!*1}Q2> ioo'T-C-C
O?P(  ( (r(   sha1i z$pbkdf2$)r   sha256iHq  sha512ia  ldap_pbkdf2_sha1z{PBKDF2}Tldap_pbkdf2_sha256z{PBKDF2-SHA256}z$pbkdf2-sha256$ldap_pbkdf2_sha512z{PBKDF2-SHA512}z$pbkdf2-sha512$s   -_c                      a  ] tR t^t o RtR tRt]! R4      t^t	^t
Rt]P                  t^tRtRt]R 4       tR tR tR	tV tR
# )r   a  This class implements Cryptacular's PBKDF2-based crypt algorithm, 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: bytes
:param salt:
    Optional salt bytes.
    If specified, it may be any length.
    If not specified, a one will be autogenerated (this is recommended).

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

:type rounds: int
:param rounds:
    Optional number of rounds to use.
    Defaults to 60000, must be within ``range(1,1<<32)``.

: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
$p5k2$r   r   r   c                    \         P                  ! WP                  ^V R7      w  r#p\        VP	                  R4      \
        4      pV'       d    \        VP	                  R4      \
        4      pV ! W#VR7      # )   )rounds_baser   r   r   )r   r   r   r   r    CTA_ALTCHARSr!   s   &&   r%   r&   cta_pbkdf2_sha1.from_string   sZ     LLyybRUVcW-|<CJJw/>C&c::r(   c                   \        V P                  \        4      P                  R 4      p\        V P                  \        4      P                  R 4      p\
        P                  ! V P                  V P                  W^R7      # )r   rg   )	r   r   rh   r+   r   r   r,   r   r   r-   s   &  r%   r/   cta_pbkdf2_sha1.to_string   sU    L188A|4;;GD}}TZZdRPPr(   c                F    \        R WP                  V P                  ^4      # )r]   r   r   r   r4   s   &&r%   r6   cta_pbkdf2_sha1._calc_checksum   s    6699dkk2FFr(   r8   Nr9   )r;   r<   r=   r>   r?   rS   r@   r
   r   r3   rC   rD   pbkdf2_sha1rE   rF   rG   rH   rI   r&   r/   r6   rJ   rK   rL   s   @r%   r   r      st     J D2LhKEM M !//NJJK ; ;QG Gr(   c                      a  ] tR t^t o RtR tRt]! R4      t]! R4      t	^t
Rt]P                  t]P                   t^tRtRt]R 4       tR tR tR	 tR
tV tR# )r   a  This class implements Dwayne Litzenberger's PBKDF2-based crypt algorithm, 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 specified, it may be any length, but must use the characters in the regexp range ``[./0-9A-Za-z]``.
    If not specified, a 16 character salt will be autogenerated (this is recommended).

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

:type rounds: int
:param rounds:
    Optional number of rounds to use.
    Defaults to 60000, must be within ``range(1,1<<32)``.

: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
rd   r   r   r   c                d    \         P                  ! WP                  ^RV R7      w  r#pV ! W#VR7      # )rf     )rg   rE   r   r   )r   r   r   r!   s   &&   r%   r&   dlitz_pbkdf2_sha1.from_string9  s0    LLyyb8;SJc&c::r(   c                    V P                   pVR 8X  d   Rp\        P                  ! V P                  WP                  V P
                  ^R7      # rs   Nrk   )r   r   r,   r   r   r   r.   r   s   & r%   r/   dlitz_pbkdf2_sha1.to_string?  s9    S=F}}TZZDMMWYZZr(   c                    V P                   pVR 8X  d   Rp\        P                  ! V P                  WP                  R^R7      # rv   )r   r   r,   r   r   rw   s   & r%   _get_configdlitz_pbkdf2_sha1._get_configE  s4    S=F}}TZZDbQQr(   c                    V P                  4       p\        R WV P                  ^4      p\        V4      P	                  R4      # )r]   r   )rz   r   r   r   r+   )r.   r5   r   results   &&  r%   r6    dlitz_pbkdf2_sha1._calc_checksumN  s:    !VV4;;C6"))'22r(   r8   Nr9   z1000000000000000000000000000000000000000000000000=)r;   r<   r=   r>   r?   rS   r@   r
   r   _stub_checksumrC   rD   r   rA   
salt_charsrp   rE   rF   rG   rH   rI   r&   r/   rz   r6   rJ   rK   rL   s   @r%   r   r      s     J D2LhKE~&N MJ
 !//NJJK ; ;
[R3 3r(   c                   d   a  ] tR tRt o RtR tR	t]! R4      t^ t	^;t
t]R 4       tR tR tRtV tR# )
atlassian_pbkdf2_sha1i[  a  This class implements the PBKDF2 hash used by Atlassian.

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

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

:type salt: bytes
:param salt:
    Optional salt bytes.
    If specified, the length must be exactly 16 bytes.
    If not specified, a salt will be autogenerated (this is recommended).

: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
    ``salt`` strings that are too long.

    .. versionadded:: 1.6
z	{PKCS5S2}c                    \        VR R4      pV P                  pVP                  V4      '       g    \        P                  P                  V 4      h\        V\        V4      R P                  R 4      4      pVR,          VR,          rTV ! WER7      # )r   r#   N:Nrf   N:rf   NN)r   r   )	r   r   
startswithr   excInvalidHashErrorr   lenr    )r"   r#   r   datar   r$   s   &&    r%   r&   !atlassian_pbkdf2_sha1.from_string{  sw    $0		u%%&&))#..c%jk*11':;ItCyc++r(   c                    V P                   V P                  ,           pV P                  \        V4      P	                  R 4      ,           p\        V4      # r*   )r   r   r   r   r+   r   )r.   r   r#   s   &  r%   r/   atlassian_pbkdf2_sha1.to_string  s<    yy4==(zzIdO227;;T""r(   c                2    \        R WP                  R^ 4      # )r]   i'  )r   r   r4   s   &&r%   r6   $atlassian_pbkdf2_sha1._calc_checksum  s     6699eR@@r(   r8   N)r   )r;   r<   r=   r>   r?   rS   r@   r
   r   r3   min_salt_sizerD   rI   r&   r/   r6   rJ   rK   rL   s   @r%   r   r   [  sS     . #DLkNEM %'&MM, ,#
A Ar(   r   c                      a  ] tR tRt o RtR tRt]! R4      t^@t	^@t
Rt]P                  t^tRtRt]R 4       tR tR	 tR
tV tR# )r   i  a  This class implements Grub's pbkdf2-hmac-sha512 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: bytes
:param salt:
    Optional salt bytes.
    If specified, the length must be between 0-1024 bytes.
    If not specified, a 64 byte salt will be autogenerated (this is recommended).

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

:type rounds: int
:param rounds:
    Optional number of rounds to use.
    Defaults to 19000, but must be within ``range(1,1<<32)``.

: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
zgrub.pbkdf2.sha512.r   r   r   c                    \         P                  ! WP                  \        R 4      V R7      w  r#p\	        VP                  R4      4      pV'       d   \	        VP                  R4      4      pV ! W#VR7      # ).)sepr   r   r   )r   r   r   r
   r   r    r!   s   &&   r%   r&   grub_pbkdf2_sha512.from_string  sZ    LLyyaf146cW-.CJJw/0C&c::r(   c           	     8   \        V P                  4      P                  R 4      P                  4       p\        V P                  4      P                  R 4      P                  4       p\
        P                  ! V P                  V P                  W\        R4      R7      # )r   r   )r   )
r   r   r+   rW   r   r   r,   r   r   r
   r-   s   &  r%   r/   grub_pbkdf2_sha512.to_string  sg    tyy!((1779dmm$++G4::<}}TZZdQsVLLr(   c                F    \        R WP                  V P                  ^@4      # )r_   rn   r4   s   &&r%   r6   !grub_pbkdf2_sha512._calc_checksum  s     8VYYRHHr(   r8   Nr9   )r;   r<   r=   r>   r?   rS   r@   r
   r   r3   rC   rD   pbkdf2_sha512rE   rF   rG   rH   rI   r&   r/   r6   rJ   rK   rL   s   @r%   r   r     sr     @  D2L#$EM M"11NJJK; ;M
I Ir(   )rp   pbkdf2_sha256r   r   r   r   )/r?   binasciir   r   base64r   r   logging	getLoggerr;   logpasslib.utilsr   passlib.utils.binaryr   r   passlib.utils.compatr	   r
   r   r   passlib.crypto.digestr   passlib.utils.handlersutilshandlersr   __all__	HasRounds
HasRawSaltHasRawChecksumGenericHandlerr   r\   rp   r   r   PrefixWrapperr`   ra   rb   rh   r   HasSaltr   r   r   r8   r(   r%   <module>r      s   2
 ( ' g''1 % 9 I I - # #1]",,r7H7H"J[J[ 1]f 7<4PX .f !V1Z=I"8R7"8R7##$6ZQ[cgh %%&:MK\^ow{| %%&:MK\^ow{|  WGbllBMM23D3DbFWFW WG@`3bjj"2C2C `3R3ABMM2+<+<b>O>O 3ApDIr}}b6G6GIZIZ DIr(   