# Functions
CreateMiscreantCookieCipher creates a new miscreant cipher with the cookie secret.
ExtendDeadline returns the time extended by a given duration.
MarshalSession marshals the session state as JSON, encrypts the JSON using the given cipher, and base64-encodes the result.
NewCookieStore returns a new session with ciphers for each of the cookie secrets.
UnmarshalSession takes the marshaled string, base64-decodes into a byte slice, decrypts the byte slice using the passed cipher, and unmarshals the resulting JSON into a session state struct.
# Variables
ErrInvalidSession is an error for invalid sessions.
ErrLifetimeExpired is an error for the lifetime deadline expiring.
# Structs
CookieStore represents all the cookie related configurations.
MockCSRFStore is a mock implementation of the CSRF store interface.
MockSessionStore is a mock implementation of the SessionStore interface.
SessionState is our object that keeps track of a user's session state.
# Interfaces
CSRFStore has the functions for setting, getting, and clearing the CSRF cookie.
SessionStore has the functions for setting, getting, and clearing the Session cookie.