|
Bayonne2 / Common C++ 2 Framework
|
The algorithm enumration class. More...
#include <ZrtpConfigure.h>

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 () | |
| 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... | |
| SrtpAlgorithms | getAlgoId () |
| Get the algorihm's integer id. More... | |
| encrypt_t | getEncrypt () |
| Get the algorihm's key length. More... | |
| decrypt_t | getDecrypt () |
| Get the algorihm's key length. More... | |
| AlgoTypes | getAlgoType () |
| Get the algorithm type of this AlgorithmEnum object. More... | |
| bool | isValid () |
| Check if this AlgorithmEnum object is valid. More... | |
Private Attributes | |
| AlgoTypes | algoType |
| std::string | algoName |
| int32_t | keyLen |
| std::string | readable |
| encrypt_t | encrypt |
| decrypt_t | decrypt |
| SrtpAlgorithms | algoId |
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.
| 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.
| 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, ... |
| AlgorithmEnum::~AlgorithmEnum | ( | ) |
AlgorithmEnum destructor.
| SrtpAlgorithms AlgorithmEnum::getAlgoId | ( | ) |
Get the algorihm's integer id.
| AlgoTypes AlgorithmEnum::getAlgoType | ( | ) |
| decrypt_t AlgorithmEnum::getDecrypt | ( | ) |
Get the algorihm's key length.
| encrypt_t AlgorithmEnum::getEncrypt | ( | ) |
Get the algorihm's key length.
| int AlgorithmEnum::getKeylen | ( | ) |
Get the algorihm's key length.
| const char* AlgorithmEnum::getName | ( | ) |
Get the algorihm's name.
| const char* AlgorithmEnum::getReadable | ( | ) |
Get the algorihm's readable name.
| bool AlgorithmEnum::isValid | ( | ) |
Check if this AlgorithmEnum object is valid.
true if the object is valid, false otherwise
|
private |
Definition at line 168 of file ZrtpConfigure.h.
|
private |
Definition at line 163 of file ZrtpConfigure.h.
|
private |
Definition at line 162 of file ZrtpConfigure.h.
|
private |
Definition at line 167 of file ZrtpConfigure.h.
|
private |
Definition at line 166 of file ZrtpConfigure.h.
|
private |
Definition at line 164 of file ZrtpConfigure.h.
|
private |
Definition at line 165 of file ZrtpConfigure.h.
1.8.6