EncryptionAlgorithm Class Reference

`#include <EncryptionAlgorithm.h>`

## Classes

struct | struct_Translation

## Public Types

enum | IRep { NONE = 0, TWOFISH = 1, RIJNDAEL128 = 2, RIJNDAEL192 = 3, RIJNDAEL256 = 4, SAFERPLUS = 5, RC2 = 6, XTEA = 7, SERPENT = 8, SAFERSK64 = 9, SAFERSK128 = 10, CAST256 = 11, LOKI97 = 12, GOST = 13, THREEWAY = 14, CAST128 = 15, BLOWFISH = 16, DES = 17, TRIPLEDES = 18, ENIGMA = 19, ARCFOUR = 20, PANAMA = 21, WAKE = 22 }
| integer representation of encryption algorithm More...

## Public Member Functions

| EncryptionAlgorithm (void)
| EncryptionAlgorithm (IRep irep)
| EncryptionAlgorithm (std::string srep)
void | setValue (IRep irep)
std::string | getStringRep (void) const
IRep | getIntegerRep (void) const
bool | operator== (const EncryptionAlgorithm &algo) const

## Static Public Member Functions

static bool | isValidStringRep (std::string srep)
static bool | isValidIntegerRep (unsigned int irep)
static std::string | translate (IRep irep)
static IRep | translate (std::string srep)

## Static Public Attributes

static const unsigned int | IRep_size = 5
| number of bits needed to code the algorithm More...

## Private Types

typedef struct EncryptionAlgorithm::struct_Translation | Translation

## Private Attributes

IRep | Value

## Static Private Attributes

static const unsigned int | NumValues = 23
static const Translation | Translations []

## Member Typedef Documentation

## Translation

typedef struct EncryptionAlgorithm::struct_Translation EncryptionAlgorithm::Translation

private

## Member Enumeration Documentation

## IRep

enum EncryptionAlgorithm::IRep

Enumerator
NONE |
TWOFISH |
RIJNDAEL128 |
RIJNDAEL192 |
RIJNDAEL256 |
SAFERPLUS |
RC2 |
XTEA |
SERPENT |
SAFERSK64 |
SAFERSK128 |
CAST256 |
LOKI97 |
GOST |
THREEWAY |
CAST128 |
BLOWFISH |
DES |
TRIPLEDES |
ENIGMA |
ARCFOUR |
PANAMA |
WAKE |

## Constructor & Destructor Documentation

## EncryptionAlgorithm() [1/3]

EncryptionAlgorithm::EncryptionAlgorithm | ( | void |  | ) |

## EncryptionAlgorithm() [2/3]

EncryptionAlgorithm::EncryptionAlgorithm | ( | EncryptionAlgorithm::IRep | irep | ) |

## EncryptionAlgorithm() [3/3]

EncryptionAlgorithm::EncryptionAlgorithm | ( | std::string | srep | ) |

construct a new EncryptionAlgorithm object from a std::string representation

Parameters

  srep | a valid(!) std::string representation

## Member Function Documentation

## getIntegerRep()

EncryptionAlgorithm::IRep EncryptionAlgorithm::getIntegerRep | ( | void |  | ) | const

## getStringRep()

std::string EncryptionAlgorithm::getStringRep | ( | void |  | ) | const

## isValidIntegerRep()

bool EncryptionAlgorithm::isValidIntegerRep | ( | unsigned int | irep | ) |

static

## isValidStringRep()

bool EncryptionAlgorithm::isValidStringRep | ( | std::string | srep | ) |

static

check if srep is a valid std::string representation (w.r.t the Translations array)

Parameters

  srep | a std::string that maybe represents an encryption algorithm fron the Translations table

Returns
  true iff the Translations table contains srep

## operator==()

bool EncryptionAlgorithm::operator== | ( | const EncryptionAlgorithm & | algo | ) | const

inline

## setValue()

void EncryptionAlgorithm::setValue | ( | EncryptionAlgorithm::IRep | irep | ) |

## translate() [1/2]

std::string EncryptionAlgorithm::translate | ( | EncryptionAlgorithm::IRep | irep | ) |

static

translate an integer representation into the corresponding std::string representation

## translate() [2/2]

EncryptionAlgorithm::IRep EncryptionAlgorithm::translate | ( | std::string | srep | ) |

static

translate a valid std::string representation into the corresponding integer representation

## Member Data Documentation

## IRep_size

const unsigned int EncryptionAlgorithm::IRep_size = 5

static

## NumValues

const unsigned int EncryptionAlgorithm::NumValues = 23

static private

## Translations

const EncryptionAlgorithm::Translation EncryptionAlgorithm::Translations

static private

Initial value:
= {
{ NONE, "none" },
{ TWOFISH, "twofish" },
{ RIJNDAEL128, "rijndael-128" },
{ RIJNDAEL192, "rijndael-192" },
{ RIJNDAEL256, "rijndael-256" },
{ SAFERPLUS, "saferplus" },
{ RC2, "rc2" },
{ XTEA, "xtea" },
{ SERPENT, "serpent" },
{ SAFERSK64, "safer-sk64" },
{ SAFERSK128, "safer-sk128" },
{ CAST256, "cast-256" },
{ LOKI97, "loki97" },
{ GOST, "gost" },
{ THREEWAY, "threeway" },
{ CAST128, "cast-128" },
{ BLOWFISH, "blowfish" },
{ DES, "des" },
{ TRIPLEDES, "tripledes" },
{ ENIGMA, "enigma" },
{ ARCFOUR, "arcfour" },
{ PANAMA, "panama" },
{ WAKE, "wake" }
}

## Value

IRep EncryptionAlgorithm::Value

private

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

- EncryptionAlgorithm.h
- EncryptionAlgorithm.cc