Ordo
0.3.4
Symmetric Cryptography Library
|
Utility. More...
Go to the source code of this file.
Macros | |
#define | PRIM_UNKNOWN |
Typedefs | |
typedef int | prim_t |
Data type which holds a primitive identifier. | |
Enumerations | |
enum | PRIM_TYPE |
Functions | |
ORDO_PUBLIC int | prim_avail (prim_t prim) |
ORDO_PUBLIC const char * | prim_name (prim_t prim) |
ORDO_PUBLIC enum PRIM_TYPE | prim_type (prim_t prim) |
ORDO_PUBLIC prim_t | prim_from_name (const char *name) |
ORDO_PUBLIC const prim_t * | prims_by_type (enum PRIM_TYPE type) |
ORDO_PUBLIC prim_t | prim_default (enum PRIM_TYPE type) |
Utility.
This header contains definitions assigning an identifier to each primitive in the library - hash functions, block ciphers, modes of operation, and so on - which can then be used in higher level API's for abstraction purposes and more expressive code. This header also provides functionality relating to primitive management, e.g. which primitives are available, etc...
Note the zero ID will always stand for an error situation e.g. a primitive is not available. The zero ID is never a valid primitive identifier.
This also allows for a quick overview of what is implemented in Ordo.
#define PRIM_UNKNOWN |
Value representing an unknown primitive, defined as zero.
enum PRIM_TYPE |
Enumerates the different types of primitives (values start at 1).
ORDO_PUBLIC int prim_avail | ( | prim_t | prim | ) |
Checks whether a primitive is available.
[in] | prim | A primitive identifier. |
ORDO_PUBLIC const char* prim_name | ( | prim_t | prim | ) |
Returns the name of a primitive.
[in] | prim | A primitive identifier. |
Returns the type of a given primitive.
[in] | prim | A primitive identifier. |
ORDO_PUBLIC prim_t prim_from_name | ( | const char * | name | ) |
Returns a primitive identifier from a name.
[in] | name | A primitive name. |
Returns a list of available primitives of a given type.
[in] | type | A primitive type. |
Returns the default available primitive of a given type.
[in] | type | A primitive type. |