Bayonne2 / Common C++ 2 Framework
Public Member Functions | Private Attributes
AlgorithmEnum Class Reference

The algorithm enumration class. More...

#include <ZrtpConfigure.h>

Collaboration diagram for AlgorithmEnum:
Collaboration graph
[legend]

Public Member Functions

  AlgorithmEnum (const AlgoTypes type, const char *name, int32_t klen, const char *ra, encrypt_t en, decrypt_t de, SrtpAlgorithms alId)
  Create an AlgorithmEnum object. More...
 
  AlgorithmEnum destructor. More...
 
const char *  getName ()
  Get the algorihm's name. More...
 
const char *  getReadable ()
  Get the algorihm's readable name. More...
 
int  getKeylen ()
  Get the algorihm's key length. More...
 
  Get the algorihm's integer id. More...
 
  Get the algorihm's key length. More...
 
  Get the algorihm's key length. More...
 
  Get the algorithm type of this AlgorithmEnum object. More...
 
bool  isValid ()
  Check if this AlgorithmEnum object is valid. More...
 

Private Attributes

 
std::string  algoName
 
int32_t  keyLen
 
std::string  readable
 
 
 
 

Detailed Description

The algorithm enumration class.

This simple class is just a container of an algorithm's name and its associated algorithm type. We use this class together with the EnumBase class to implement a Java-like enum class functionality (not fully, but OK for our use case).

An application shall use the get / check methods to retrieve information.

Definition at line 62 of file ZrtpConfigure.h.

Constructor & Destructor Documentation

AlgorithmEnum::AlgorithmEnum ( const AlgoTypes  type,
const char *  name,
int32_t  klen,
const char *  ra,
encrypt_t  en,
decrypt_t  de,
SrtpAlgorithms  alId 
)

Create an AlgorithmEnum object.

Parameters
type Defines the algorithm type
name Set the names of the algorithm. The name is copied and the call may reuse the space.
klen The key length for this algorihm in byte, for example 16 or 32
ra A human readable short string that describes the algorihm.
en Pointer to the encryption function of this algorithn
de Pointer to the decryption funtions of this algorithm.
alId The algorithm id used by SRTP to identify an algorithm type, for example Skein, Sha1, Aes, ...
See Also
AlgoTypes
AlgorithmEnum::~AlgorithmEnum ( )

AlgorithmEnum destructor.

Member Function Documentation

SrtpAlgorithms AlgorithmEnum::getAlgoId ( )

Get the algorihm's integer id.

Returns
An integer that defines the algorithm.
AlgoTypes AlgorithmEnum::getAlgoType ( )

Get the algorithm type of this AlgorithmEnum object.

Returns
The algorithm type.
See Also
AlgoTypes
decrypt_t AlgorithmEnum::getDecrypt ( )

Get the algorihm's key length.

Returns
An integer definig the key length in bytes.
encrypt_t AlgorithmEnum::getEncrypt ( )

Get the algorihm's key length.

Returns
An integer definig the key length in bytes.
int AlgorithmEnum::getKeylen ( )

Get the algorihm's key length.

Returns
An integer definig the key length in bytes.
const char* AlgorithmEnum::getName ( )

Get the algorihm's name.

Returns
Algorithm's name as null terminated C-string. The application must not free this memory.
const char* AlgorithmEnum::getReadable ( )

Get the algorihm's readable name.

Returns
Algorithm's readable name as null terminated C-string. The application must not free this memory.
bool AlgorithmEnum::isValid ( )

Check if this AlgorithmEnum object is valid.

Returns
true if the object is valid, false otherwise

Field Documentation

SrtpAlgorithms AlgorithmEnum::algoId
private

Definition at line 168 of file ZrtpConfigure.h.

std::string AlgorithmEnum::algoName
private

Definition at line 163 of file ZrtpConfigure.h.

AlgoTypes AlgorithmEnum::algoType
private

Definition at line 162 of file ZrtpConfigure.h.

decrypt_t AlgorithmEnum::decrypt
private

Definition at line 167 of file ZrtpConfigure.h.

encrypt_t AlgorithmEnum::encrypt
private

Definition at line 166 of file ZrtpConfigure.h.

int32_t AlgorithmEnum::keyLen
private

Definition at line 164 of file ZrtpConfigure.h.

std::string AlgorithmEnum::readable
private

Definition at line 165 of file ZrtpConfigure.h.


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

Generated on Dec 21, 2017 for commoncpp2-1.8.1, ccrtp-1.7.2, libzrtpcpp-2.3.4, ccscript3-1.1.7, ccaudio2-1.0.0 and bayonne2-2.3.2 (after installation in /usr/local/) by   doxygen 1.8.6

AltStyle によって変換されたページ (->オリジナル) /