CernVM-FS
2.12.0
|
#include <encrypt.h>
Public Member Functions | |
virtual | ~Cipher () |
bool | Encrypt (const std::string &plaintext, const Key &key, std::string *ciphertext) |
virtual std::string | name () const =0 |
virtual Algorithms | algorithm () const =0 |
virtual unsigned | key_size () const =0 |
virtual unsigned | iv_size () const =0 |
virtual unsigned | block_size () const =0 |
Static Public Member Functions | |
static Cipher * | Create (const Algorithms a) |
static bool | Decrypt (const std::string &ciphertext, const Key &key, std::string *plaintext) |
Protected Member Functions | |
Cipher () | |
virtual std::string | DoEncrypt (const std::string &plaintext, const Key &key)=0 |
virtual std::string | DoDecrypt (const std::string &ciphertext, const Key &key)=0 |
The interface for an encryption algorithm. Uses a simple envelope with a one byte prefix: the first 4 bits are the envelope version (currently 0), the second 4 bits are the encryption algorithm and refers to Algorithms.
|
pure virtual |
Implemented in cipher::CipherNone, and cipher::CipherAes256Cbc.
|
pure virtual |
Implemented in cipher::CipherNone, and cipher::CipherAes256Cbc.
|
static |
Definition at line 158 of file encrypt.cc.
Referenced by receiver::GenerateSessionToken().
|
static |
Definition at line 189 of file encrypt.cc.
Referenced by receiver::CheckToken().
|
protectedpure virtual |
Implemented in cipher::CipherNone, and cipher::CipherAes256Cbc.
|
protectedpure virtual |
Implemented in cipher::CipherNone, and cipher::CipherAes256Cbc.
bool cipher::Cipher::Encrypt | ( | const std::string & | plaintext, |
const Key & | key, | ||
std::string * | ciphertext | ||
) |
Definition at line 171 of file encrypt.cc.
Referenced by receiver::GenerateSessionToken().
|
pure virtual |
Implemented in cipher::CipherNone, and cipher::CipherAes256Cbc.
|
pure virtual |
Implemented in cipher::CipherNone, and cipher::CipherAes256Cbc.
|
pure virtual |
Implemented in cipher::CipherNone, and cipher::CipherAes256Cbc.