CernVM-FS  2.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
cipher::Cipher Class Referenceabstract

#include <encrypt.h>

Inheritance diagram for cipher::Cipher:

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

Detailed Description

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.

Definition at line 89 of file encrypt.h.

Constructor & Destructor Documentation

virtual cipher::Cipher::~Cipher ( )
inlinevirtual

Definition at line 92 of file encrypt.h.

cipher::Cipher::Cipher ( )
inlineprotected

Definition at line 106 of file encrypt.h.

Member Function Documentation

virtual Algorithms cipher::Cipher::algorithm ( ) const
pure virtual
virtual unsigned cipher::Cipher::block_size ( ) const
pure virtual
Cipher * cipher::Cipher::Create ( const Algorithms  a)
static

Definition at line 158 of file encrypt.cc.

Referenced by receiver::GenerateSessionToken().

Here is the caller graph for this function:

bool cipher::Cipher::Decrypt ( const std::string &  ciphertext,
const Key key,
std::string *  plaintext 
)
static

Definition at line 189 of file encrypt.cc.

Referenced by receiver::CheckToken().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual std::string cipher::Cipher::DoDecrypt ( const std::string &  ciphertext,
const Key key 
)
protectedpure virtual
virtual std::string cipher::Cipher::DoEncrypt ( const std::string &  plaintext,
const Key key 
)
protectedpure virtual
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().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual unsigned cipher::Cipher::iv_size ( ) const
pure virtual
virtual unsigned cipher::Cipher::key_size ( ) const
pure virtual
virtual std::string cipher::Cipher::name ( ) const
pure virtual

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