|
libenigma
Enigma machine utility library
|
Functions | |
| int | enigma_rotor_generate_indices (EnigmaRotor *rotor, const char *alphabet) |
| Generate the indices for the rotor. | |
| const char * | enigma_rotor_get_name (const EnigmaRotor *rotor) |
| Get the name of the rotor. | |
| const int * | enigma_rotor_get_fwd_indices (const EnigmaRotor *rotor) |
| Get the forward indices of the rotor. | |
| const int * | enigma_rotor_get_rev_indices (const EnigmaRotor *rotor) |
| Get the reverse indices of the rotor. | |
| const int * | enigma_rotor_get_notches (const EnigmaRotor *rotor) |
| Get the notches of the rotor. | |
| int | enigma_rotor_get_notches_count (const EnigmaRotor *rotor) |
| Get the number of notches of the rotor. | |
| int | enigma_rotor_set_name (EnigmaRotor *rotor, const char *name) |
| Set the name of the rotor. | |
| int | enigma_rotor_set_fwd_indices (EnigmaRotor *rotor, const int *indices) |
| Set the forward indices of the rotor. | |
| int | enigma_rotor_set_rev_indices (EnigmaRotor *rotor, const int *indices) |
| Set the reverse indices of the rotor. | |
| int | enigma_rotor_set_notches (EnigmaRotor *rotor, const int *notches, int count) |
| Set the notches of the rotor. | |
| int | enigma_rotor_set_notches_count (EnigmaRotor *rotor, int count) |
| Set the notches count of the rotor. | |
This file contains functions for rotor manipulation and getters/setters for WASM.
| int enigma_rotor_generate_indices | ( | EnigmaRotor * | rotor, |
| const char * | alphabet | ||
| ) |
Generate the indices for the rotor.
This function generates the indices for the rotor.
| rotor | The rotor to generate the indices for. |
| alphabet | The alphabet to generate the indices from. |
| const int * enigma_rotor_get_fwd_indices | ( | const EnigmaRotor * | rotor | ) |
Get the forward indices of the rotor.
This function gets the forward indices of the rotor.
| rotor | The rotor to get the forward indices of. |
| const char * enigma_rotor_get_name | ( | const EnigmaRotor * | rotor | ) |
Get the name of the rotor.
This function gets the name of the rotor.
| rotor | The rotor to get the name of. |
| const int * enigma_rotor_get_notches | ( | const EnigmaRotor * | rotor | ) |
Get the notches of the rotor.
This function gets the notches of the rotor.
| rotor | The rotor to get the notches of. |
| int enigma_rotor_get_notches_count | ( | const EnigmaRotor * | rotor | ) |
Get the number of notches of the rotor.
This function gets the number of notches of the rotor.
| rotor | The rotor to get the number of notches of. |
| const int * enigma_rotor_get_rev_indices | ( | const EnigmaRotor * | rotor | ) |
Get the reverse indices of the rotor.
This function gets the reverse indices of the rotor.
| rotor | The rotor to get the reverse indices of. |
| int enigma_rotor_set_fwd_indices | ( | EnigmaRotor * | rotor, |
| const int * | indices | ||
| ) |
Set the forward indices of the rotor.
This function sets the forward indices of the rotor.
| rotor | The rotor to set the forward indices of. |
| indices | The forward indices to set. |
| int enigma_rotor_set_name | ( | EnigmaRotor * | rotor, |
| const char * | name | ||
| ) |
Set the name of the rotor.
This function sets the name of the rotor (uses strdup, make sure to free this memory when done).
| rotor | The rotor to set the name of. |
| name | The name to set. |
| int enigma_rotor_set_notches | ( | EnigmaRotor * | rotor, |
| const int * | notches, | ||
| int | count | ||
| ) |
Set the notches of the rotor.
This function sets the notches of the rotor.
| rotor | The rotor to set the notches of. |
| notches | The notches to set. |
| count | The number of notches. |
| int enigma_rotor_set_notches_count | ( | EnigmaRotor * | rotor, |
| int | count | ||
| ) |
Set the notches count of the rotor.
This function sets the notches count of the rotor.
| rotor | The rotor to set the notches count of. |
| count | The notches count to set. |
| int enigma_rotor_set_rev_indices | ( | EnigmaRotor * | rotor, |
| const int * | indices | ||
| ) |
Set the reverse indices of the rotor.
This function sets the reverse indices of the rotor.
| rotor | The rotor to set the reverse indices of. |
| indices | The reverse indices to set. |