+
    i                     N   R t ^ RIt^ RIt]P                  ! ]4      t^ RIHtHtH	t	H
t
 ^ RIHtHt ^ RIHu Ht ^ RIHt . ROt ! R R]P*                  4      t]RR3R lt]! R	R
R7      t]! RRR
R7      t]! RR
R7      t]! R4      t]! R4      t ! R R]P:                  4      tR# )z.passlib.handlers.digests - plain hash digests
N)to_native_strto_bytesrender_bytesconsteq)unicodestr_to_uascii)lookup_hashc                   ^   a  ] tR t^t o RtRtRt]P                  t	Rt
]R 4       tR tRtV tR# )HexDigestHashzTthis provides a template for supporting passwords stored as plain hexadecimal hashesNTc                "    VP                  4       # N)lowerclshashs   &&V/var/www/html/photoedit/myenv/lib/python3.14/site-packages/passlib/handlers/digests.py
_norm_hashHexDigestHash._norm_hash+   s    zz|    c                    \        V\        4      '       d   VP                  R 4      p\        V P	                  V4      P                  4       4      # utf-8)
isinstancer   encoder   
_hash_func	hexdigest)selfsecrets   &&r   _calc_checksumHexDigestHash._calc_checksum/   s:    fg&&]]7+FT__V4>>@AAr    )__name__
__module____qualname____firstlineno____doc__r   checksum_sizeuh	HEX_CHARSchecksum_chars	supportedclassmethodr   r   __static_attributes____classdictcell____classdict__s   @r   r
   r
      sD     ^ JM\\N I
  B Br   r
   Tc                j   \        WR7      pRVP                  ,           pVP                  '       g   ^ Vn        \	        V\
        3\        VV\        VP                  4      VP                  ^,          RVP                  : R2R7      4      pVP                  '       g   RVn        V'       d   W&n	        V# )a(  
create hex-encoded unsalted hasher for specified digest algorithm.

.. versionchanged:: 1.7.3
    If called with unknown/supported digest, won't throw error immediately,
    but instead return a dummy hasher that will throw error when called.

    set ``required=True`` to restore old behavior.
requiredhex_z*This class implements a plain hexadecimal zb hash, and follows the :ref:`password-hash-api`.

It supports no optional or contextual keywords.
)namer"   r   r&   r%   F)
r   r4   r*   digest_sizetyper
   dictstaticmethodconstdjango_name)digestmoduler:   r2   infor4   hashers   &&&&   r   create_hex_hashr?   8   s     v1DDIID>>>$($

+&&q( yy	+ 	F >>> (Mr   md4Fr1   md5unsalted_md5)r:   r2   sha1sha256sha512c                      a  ] tR t^gt o RtR tRtRtRt]	RR l4       t
]	R 4       t]	RR l4       t]	R 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# )htdigestz:htdigest hash function.

.. todo::
    document this hash
r   Nc                6   V'       g   V P                   p\        P                  ! V4       \        V\        4      '       d   VP                  V4      p\        W$R 4      p\        W4R4      p\        RW#V4      p\        P                  ! V4      P                  4       # )userrealmz%s:%s:%s)default_encodingr'   validate_secretr   r   r   r   r   hashlibrA   r   )r   r   rI   rJ   encodingdatas   &&&&& r   r   htdigest.hashr   sy     ++H
6"fg&&]]8,F/'2JV<{{4 **,,r   c                    \        VRR7      p\        V4      ^ 8w  d!   \        P                  P	                  V R4      hV F8  pV\        P
                  9  g   K  \        P                  P	                  V R4      h	  V# )z0normalize hash to native string, and validate itr   )paramz
wrong sizezinvalid chars in hash)r   lenr'   excMalformedHashErrorLC_HEX_CHARS)r   r   chars   && r   r   htdigest._norm_hash   sg     T0t9?&&++C>>D2??*ff//5LMM  r   c                ^    V P                  V4      pV P                  WWE4      p\        W&4      # r   )r   r   r   )r   r   r   rI   rJ   rN   others   &&&&&& r   verifyhtdigest.verify   s+    ~~d#u7t##r   c                N     V P                  V4       R#   \         d     R # i ; i)FT)r   
ValueErrorr   s   &&r   identifyhtdigest.identify   s,    	NN4    		s    $$z1.7z2.0)
deprecatedremovedc                (    V P                  R R R 4      # ) )r   )r   s   &r   	genconfightdigest.genconfig   s     xxB##r   c                H    V P                  V4       V P                  WWE4      # r   )r   r   )r   r   configrI   rJ   rN   s   &&&&&&r   genhashhtdigest.genhash   s!    
 	vxxe66r   r    )rI   rJ   rN   r   r   )r!   r"   r#   r$   r%   r4   setting_kwdscontext_kwdsrK   r+   r   r   r[   r_   r'   deprecated_methodre   ri   r,   r-   r.   s   @r   rG   rG   g   s     
 DL0L- -   $ $
   UE:$  ;$ UE:7  ;7r   rG   )r?   hex_md4hex_md5hex_sha1
hex_sha256
hex_sha512)r%   rM   logging	getLoggerr!   logpasslib.utilsr   r   r   r   passlib.utils.compatr   r   passlib.utils.handlersutilshandlersr'   passlib.crypto.digestr   __all__StaticHandlerr
   r?   rn   ro   rp   rq   rr   MinimalHandlerrG   r    r   r   <module>r      s     g''1 I H 7 # # -BB$$ B8 $, L ee4e%Pfu5h'
h'

=7r   =7r   