+
    Tje
                         R t ^ RIt^ RIt^ RIt^ RIHt ^ RIHt  ! R R]4      t	RRR/R llt
R	t]3R
 ltR tRR ltR# )z3
Django's standard crypto functions and utilities.
N)settings)force_bytesc                       ] tR t^tRtRtR# )InvalidAlgorithmz&Algorithm is not supported by hashlib. N)__name__
__module____qualname____firstlineno____doc____static_attributes__r       H/var/www/idalgo/venv/lib/python3.14/site-packages/django/utils/crypto.pyr   r      s    0r   r   	algorithmsha1c               @   Vf   \         P                  p\        V 4      p \        V4      p \        \        V4      pT! Y,           4      P                  4       p\        P                  ! T\        T4      TR7      #   \
         d   p\        RT,          4      ThRp?ii ; i)a  
Return the HMAC of 'value', using a key generated from key_salt and a
secret (which defaults to settings.SECRET_KEY). Default algorithm is SHA1,
but any algorithm name supported by hashlib can be passed.

A different key_salt should be passed in for every application of HMAC.
Nz6%r is not an algorithm accepted by the hashlib module.)msg	digestmod)
r   
SECRET_KEYr   getattrhashlibAttributeErrorr   digesthmacnew)key_saltvaluesecretr   hasherekeys   &&&$   r   salted_hmacr!      s     ~$$8$H F), "
#
*
*
,C
 88C[/6BB  DyP
	s   A: :BBB>abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789c                L   a RP                  V3R l\        V 4       4       4      # )a+  
Return a securely generated random string.

The bit length of the returned value can be calculated with the formula:
    log_2(len(allowed_chars)^length)

For example, with default `allowed_chars` (26+26+10), this gives:
  * length: 12, bit length =~ 71 bits
  * length: 22, bit length =~ 131 bits
 c              3   P   <"   T F  p\         P                  ! S4      x  K  	  R # 5iN)secretschoice).0iallowed_charss   & r   	<genexpr>$get_random_string.<locals>.<genexpr>>   s     H-Q7>>-00-s   #&)joinrange)lengthr+   s   &fr   get_random_stringr1   3   s     77H%-HHHr   c                T    \         P                  ! \        V 4      \        V4      4      # )z:Return True if the two strings are equal, False otherwise.)r'   compare_digestr   )val1val2s   &&r   constant_time_comparer6   A   s    !!+d"3[5FGGr   c                    Vf   \         P                  pT;'       g    Rp\        V 4      p \        V4      p\         P                  ! V! 4       P                  WW#4      # )z)Return the hash of password using pbkdf2.N)r   sha256r   pbkdf2_hmacname)passwordsalt
iterationsdklenr   s   &&&&&r   pbkdf2r?   F   sJ    ~MMTE8$HtDvx}}hjPPr   r&   )    N)r   r   r   r'   django.confr   django.utils.encodingr   
ValueErrorr   r!   RANDOM_STRING_CHARSr1   r6   r?   r   r   r   <module>rE      sV         -	z 	C6 C: W  -@ IH
Qr   