+
    Sj                     `    ^ RI H t  ^ RIHt ^ RIHtHt ^ RIHtHt  ! R R4      t	]	! 4       t
R# )    )datetime)settings)constant_time_comparesalted_hmac)base36_to_intint_to_base36c                      a  ] tR t^t o RtRtRtRtRtR t	R t
R t]! ]
]4      tR tR t]! ]]4      tR	 tR
 tR tR tR tR tRtV tR# )PasswordResetTokenGeneratorzU
Strategy object used to generate and check tokens for the password
reset mechanism.
z6django.contrib.auth.tokens.PasswordResetTokenGeneratorNc                <    V P                   ;'       g    R V n         R# )sha256N)	algorithmselfs   &O/var/www/idalgo/venv/lib/python3.14/site-packages/django/contrib/auth/tokens.py__init__$PasswordResetTokenGenerator.__init__   s    338    c                J    V P                   ;'       g    \        P                  # N)_secretr   
SECRET_KEYr   s   &r   _get_secret'PasswordResetTokenGenerator._get_secret   s    ||22x222r   c                    Wn         R # r   )r   )r   secrets   &&r   _set_secret'PasswordResetTokenGenerator._set_secret   s    r   c                V    V P                   f   \        P                  # V P                   # r   )_secret_fallbacksr   SECRET_KEY_FALLBACKSr   s   &r   _get_fallbacks*PasswordResetTokenGenerator._get_fallbacks   s&    !!)000%%%r   c                    Wn         R # r   )r   )r   	fallbackss   &&r   _set_fallbacks*PasswordResetTokenGenerator._set_fallbacks#   s    !*r   c                v    V P                  VV P                  V P                  4       4      V P                  4      # )zQ
Return a token that can be used once to do a password reset
for the given user.
)_make_token_with_timestamp_num_seconds_nowr   )r   users   &&r   
make_token&PasswordResetTokenGenerator.make_token(   s5    
 ..diik*KK
 	
r   c                   V'       d	   V'       g   R#  VP                  R4      w  r4 \        T4      pT P                  .T P                  O F'  p\        T P                  YT4      T4      '       g   K'   M	  R# T P                  T P                  4       4      T,
          \        P                  8  d   R# R#   \         d     R# i ; i  \         d     R# i ; i)z@
Check that a password reset token is correct for a given user.
F-T)split
ValueErrorr   r   secret_fallbacksr   r(   r)   r*   r   PASSWORD_RESET_TIMEOUT)r   r+   tokents_b36_tsr   s   &&&    r   check_token'PasswordResetTokenGenerator.check_token3   s     	C(IF	v&B
 {{;T%:%:;F$//&A   <  diik*R/83R3RR-  		
  		s"   B6 C 6CCCCc                    \        V4      p\        V P                  V P                  W4      VV P                  R 7      P                  4       R,          pV: RV: 2# ))r   r   :NN   r/   )r   r   key_salt_make_hash_valuer   	hexdigest)r   r+   	timestampr   r5   hash_strings   &&&&  r   r(   6PasswordResetTokenGenerator._make_token_with_timestampT   sU     y)!MM!!$2nn	

 )+
 !+..r   c                    VP                   f   RMVP                   P                  ^ RR7      pVP                  4       p\        WR4      ;'       g    RpVP                   VP
                   V V V 2# )ab  
Hash the user's primary key, email (if available), and some user state
that's sure to change after a password reset to produce a token that is
invalidated when it's used:
1. The password field will change upon a password reset (even if the
   same password is chosen, due to password salting).
2. The last_login field will usually be updated very shortly after
   a password reset.
Failing those things, settings.PASSWORD_RESET_TIMEOUT eventually
invalidates the token.

Running this data through salted_hmac() prevents password cracking
attempts using the reset token, provided the secret isn't compromised.
N )microsecondtzinfo)
last_loginreplaceget_email_field_namegetattrpkpassword)r   r+   r?   login_timestampemail_fieldemails   &&&   r   r=   ,PasswordResetTokenGenerator._make_hash_valueb   sw    & & ((Qt(D 	
 //12.44"''4==//):9+eWMMr   c                X    \        V\        R ^^4      ,
          P                  4       4      # )i  )intr   total_seconds)r   dts   &&r   r)   (PasswordResetTokenGenerator._num_seconds|   s$    B$1--<<>??r   c                ,    \         P                  ! 4       # r   )r   nowr   s   &r   r*    PasswordResetTokenGenerator._now   s    ||~r   )r   r   r   )__name__
__module____qualname____firstlineno____doc__r<   r   r   r   r   r   r   propertyr   r!   r%   r2   r,   r8   r(   r=   r)   r*   __static_attributes____classdictcell__)__classdict__s   @r   r
   r
      s~     
 HHIG43 k;/F&
+  ?	
B/N4@ r   r
   N)r   django.confr   django.utils.cryptor   r   django.utils.httpr   r   r
   default_token_generator r   r   <module>rf      s)       B :y yx 67 r   