CernVM-FS  2.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
cipher::Key Class Reference

#include <encrypt.h>

Inheritance diagram for cipher::Key:
Collaboration diagram for cipher::Key:

Public Member Functions

bool SaveToFile (const std::string &path)
 
 ~Key ()
 
unsigned size () const
 
const unsigned char * data () const
 
std::string ToBase64 () const
 

Static Public Member Functions

static KeyCreateRandomly (const unsigned size)
 
static KeyCreateFromFile (const std::string &path)
 
static KeyCreateFromString (const std::string &key)
 

Static Public Attributes

static const unsigned kMaxSize = 64
 

Private Member Functions

 Key ()
 
- Private Member Functions inherited from SingleCopy
 SingleCopy ()
 

Private Attributes

unsigned char * data_
 
unsigned size_
 

Detailed Description

Encapsulates a small non-copyable piece of pinned memory. Is actively set to zero on destruction.

Definition at line 37 of file encrypt.h.

Constructor & Destructor Documentation

cipher::Key::~Key ( )

Definition at line 89 of file encrypt.cc.

cipher::Key::Key ( )
inlineprivate

Definition at line 52 of file encrypt.h.

Member Function Documentation

Key * cipher::Key::CreateFromFile ( const std::string &  path)
static

Definition at line 47 of file encrypt.cc.

Here is the call graph for this function:

Key * cipher::Key::CreateFromString ( const std::string &  key)
static

Definition at line 77 of file encrypt.cc.

Referenced by receiver::CheckToken().

Here is the call graph for this function:

Here is the caller graph for this function:

Key * cipher::Key::CreateRandomly ( const unsigned  size)
static

Definition at line 32 of file encrypt.cc.

Referenced by receiver::GenerateSessionToken().

Here is the caller graph for this function:

const unsigned char* cipher::Key::data ( ) const
inline
bool cipher::Key::SaveToFile ( const std::string &  path)

Definition at line 97 of file encrypt.cc.

Here is the call graph for this function:

unsigned cipher::Key::size ( ) const
inline
string cipher::Key::ToBase64 ( ) const

Definition at line 109 of file encrypt.cc.

Referenced by receiver::GenerateSessionToken().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

unsigned char* cipher::Key::data_
private

Definition at line 53 of file encrypt.h.

Referenced by CreateFromFile(), CreateRandomly(), and data().

const unsigned cipher::Key::kMaxSize = 64
static

Definition at line 39 of file encrypt.h.

unsigned cipher::Key::size_
private

Definition at line 54 of file encrypt.h.

Referenced by CreateFromFile(), CreateRandomly(), and size().


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