CppCMS
|
This is an interface to generic session cookies encryption or signing API. More...
#include <cppcms/session_cookies.h>
Public Member Functions | |
virtual std::string | encrypt (std::string const &plain)=0 |
virtual bool | decrypt (std::string const &cipher, std::string &plain)=0 |
virtual | ~encryptor () |
This is an interface to generic session cookies encryption or signing API.
Note for users implementing their own ecryptor classes:
Note this class does not have to be thread safe to use from multiple threads.
|
inlinevirtual |
Destructor
|
pure virtual |
Decrypt the cipher text or check the signature and return the plain text and the session expiration value: timeout.
If signature checks or decryption failed return false.
|
pure virtual |
Encrypt or sign the plain text plain together with timeout and return the encrypted value for a cookie. Don't forget to use base64 encoding in order to create a string that is valid for cookie