The algorithm enumration class.
More...
#include <ZrtpConfigure.h>
Collaboration diagram for AlgorithmEnum:
Public Member Functions
Get the algorihm's readable name.
More...
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...
Private Attributes
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,
)
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
(
)
Member Function Documentation
Get the algorihm's integer id.
- Returns
- An integer that defines the algorithm.
Get the algorihm's key length.
- Returns
- An integer definig the key length in bytes.
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
std::string AlgorithmEnum::algoName
private
int32_t AlgorithmEnum::keyLen
private
std::string AlgorithmEnum::readable
private
The documentation for this class was generated from the following file: