|
libenigma
Enigma machine utility library
|
#include "common.h"Go to the source code of this file.
Data Structures | |
| struct | EnigmaReflector |
| Represents a reflector configuration for the Enigma machine. More... | |
Macros | |
| #define | ENIGMA_REFLECTOR_COUNT 3 |
| Total number of available reflectors. | |
Functions | |
| int | enigma_reflector_generate_indices (EnigmaReflector *, const char *) |
| Generate the indices for the reflector. | |
| const char * | enigma_reflector_get_name (const EnigmaReflector *) |
| Get the name of the reflector. | |
| const int * | enigma_reflector_get_indices (const EnigmaReflector *) |
| Get the indices of the reflector. | |
| int | enigma_reflector_set_name (EnigmaReflector *, const char *) |
| Set the name of the reflector. | |
| int | enigma_reflector_set_indices (EnigmaReflector *, const int *) |
| Set the indices of the reflector. | |
This file defines the standard reflectors used in the Enigma machine.
| #define ENIGMA_REFLECTOR_COUNT 3 |
Total number of available reflectors.
| int enigma_reflector_generate_indices | ( | EnigmaReflector * | reflector, |
| const char * | alphabet | ||
| ) |
Generate the indices for the reflector.
| reflector | The reflector to generate the indices for. |
| alphabet | The alphabet to generate the indices from. |
| const int * enigma_reflector_get_indices | ( | const EnigmaReflector * | reflector | ) |
Get the indices of the reflector.
| reflector | The reflector to get the indices of. |
| const char * enigma_reflector_get_name | ( | const EnigmaReflector * | reflector | ) |
Get the name of the reflector.
| reflector | The reflector to get the name of. |
| int enigma_reflector_set_indices | ( | EnigmaReflector * | reflector, |
| const int * | indices | ||
| ) |
Set the indices of the reflector.
| reflector | The reflector to set the indices of. |
| indices | The indices to set. |
| int enigma_reflector_set_name | ( | EnigmaReflector * | reflector, |
| const char * | name | ||
| ) |
Set the name of the reflector.
This function sets the name of the reflector (uses strdup, make sure to free this memory when done).
| reflector | The reflector to set the name of. |
| name | The name to set. |