
    (pht
                     2    S SK Jr  S SKJr   " S S\5      rg)    )SessionBase)signingc                   Z    \ rS rSrS rS rSS jrSS jrSS jrS r	S	 r
\S
 5       rSrg)SessionStore   c                      [         R                  " U R                  U R                  U R	                  5       SS9$ ! [
         a    U R                  5          0 $ f = f)z
Load the data from the key itself instead of fetching from some
external data store. Opposite of _get_session_key(), raise BadSignature
if signature fails.
/django.contrib.sessions.backends.signed_cookies)
serializermax_agesalt)r   loadssession_keyr
   get_session_cookie_age	Exceptioncreateselfs    b/var/www/html/venv/lib/python3.13/site-packages/django/contrib/sessions/backends/signed_cookies.pyloadSessionStore.load   sX    	==  ??335F   	 KKM			s   8; AAc                     SU l         g)zm
To create a new key, set the modified flag so that the cookie is set
on the client for the current request.
TN)modifiedr   s    r   r   SessionStore.create   s    
     c                 <    U R                  5       U l        SU l        g)z
To save, get the session key as a securely signed string and then set
the modified flag so that the cookie is set on the client for the
current request.
TN)_get_session_key_session_keyr   )r   must_creates     r   saveSessionStore.save!   s     !113r   Nc                     g)z
This method makes sense when you're talking to a shared resource, but
it doesn't matter when you're storing the information in the client's
cookie.
F r   r   s     r   existsSessionStore.exists*   s     r   c                 .    SU l         0 U l        SU l        g)z
To delete, clear the session key and the underlying data structure
and set the modified flag so that the cookie is set on the client for
the current request.
 TN)r   _session_cacher   r#   s     r   deleteSessionStore.delete2   s      r   c                 $    U R                  5         g)z
Keep the same data but with a new key. Call save() and it will
automatically save a cookie with a new key at the end of the request.
N)r   r   s    r   	cycle_keySessionStore.cycle_key<   s    
 			r   c                 X    [         R                  " U R                  SSU R                  S9$ )zu
Instead of generating a random string, generate a secure url-safe
base64-encoded string of data as our session key.
Tr	   )compressr   r
   )r   dumps_sessionr
   r   s    r   r   SessionStore._get_session_keyC   s)    
 }}MMB	
 	
r   c                     g Nr"   )clss    r   clear_expiredSessionStore.clear_expiredO   s    r   )r(   r   r   )Fr4   )__name__
__module____qualname____firstlineno__r   r   r   r$   r)   r,   r   classmethodr6   __static_attributes__r"   r   r   r   r      s9    (

  r   r   N)%django.contrib.sessions.backends.baser   django.corer   r   r"   r   r   <module>r@      s    = L; Lr   