CppCMS
Public Member Functions
cppcms::sessions::encryptor Class Reference

This is an interface to generic session cookies encryption or signing API. More...

#include <cppcms/session_cookies.h>

Inheritance diagram for cppcms::sessions::encryptor:
booster::noncopyable

List of all members.

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 ()

Detailed Description

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.


Constructor & Destructor Documentation

virtual cppcms::sessions::encryptor::~encryptor ( ) [inline, virtual]

Destructor


Member Function Documentation

virtual bool cppcms::sessions::encryptor::decrypt ( std::string const &  cipher,
std::string &  plain 
) [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.

virtual std::string cppcms::sessions::encryptor::encrypt ( std::string const &  plain) [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


The documentation for this class was generated from the following file: