|
Noise-C
|
Data Structures | |
| struct | NoiseProtocolId |
| Noise protocol name broken out into separate identifier fields. More... | |
Functions | |
| const char * | noise_id_to_name (int category, int id) |
| Maps an algorithm identifier to the corresponding name. More... | |
| int | noise_name_to_id (int category, const char *name, size_t name_len) |
| Maps an algorithm name to the corresponding identifier. More... | |
| int | noise_protocol_id_to_name (char *name, size_t name_len, const NoiseProtocolId *id) |
| Formats a protocol name from a set of identifiers for the algorithms that make up the name. More... | |
| int | noise_protocol_name_to_id (NoiseProtocolId *id, const char *name, size_t name_len) |
| Parses a protocol name into a set of identifiers for the algorithms that are indicated by the name. More... | |
| struct NoiseProtocolId |
Noise protocol name broken out into separate identifier fields.
| const char* noise_id_to_name | ( | int | category, |
| int | id | ||
| ) |
Maps an algorithm identifier to the corresponding name.
| category | The category of identifier to look for; one of NOISE_CIPHER_CATEGORY, NOISE_HASH_CATEGORY, NOISE_DH_CATEGORY, NOISE_PATTERN_CATEGORY, NOISE_PREFIX_CATEGORY, NOISE_SIGN_CATEGORY, or zero. Zero indicates "any category". |
| id | The algorithm identifier to map. |
The category parameter can be used to restrict the search to algorithms of a certain type. If the id is valid for some other category, that mapping will be ignored.
| int noise_name_to_id | ( | int | category, |
| const char * | name, | ||
| size_t | name_len | ||
| ) |
Maps an algorithm name to the corresponding identifier.
| category | The category of identifier to look for; one of NOISE_CIPHER_CATEGORY, NOISE_HASH_CATEGORY, NOISE_DH_CATEGORY, NOISE_PATTERN_CATEGORY, NOISE_PREFIX_CATEGORY, NOISE_SIGN_CATEGORY, or zero. Zero indicates "any category". |
| name | Points to the name to map. |
| name_len | Length of the name in bytes. |
The category parameter can be used to restrict the search to algorithms of a certain type. If the name is valid for some other category, that mapping will be ignored.
| int noise_protocol_id_to_name | ( | char * | name, |
| size_t | name_len, | ||
| const NoiseProtocolId * | id | ||
| ) |
Formats a protocol name from a set of identifiers for the algorithms that make up the name.
| name | The buffer to write the protocol name to. |
| name_len | The number of bytes of space in the name buffer. |
| id | The set of identifiers to format. |
This function guarantees to NUL-terminate the name if the function succeeds.
It is recommended that name_len be at least NOISE_MAX_PROTOCOL_NAME bytes in length.
| int noise_protocol_name_to_id | ( | NoiseProtocolId * | id, |
| const char * | name, | ||
| size_t | name_len | ||
| ) |
Parses a protocol name into a set of identifiers for the algorithms that are indicated by the name.
| id | The resulting structure to populate with identifiers. |
| name | Points to the start of the protocol name. |
| name_len | The length of the protocol name in bytes. |
1.8.6