|
libenigma
Enigma machine utility library
|
Represents the state and configuration of an Enigma machine. More...
#include <enigma.h>
Data Fields | |
| const EnigmaRotor * | rotors [4] |
| Array of pointers to rotor configurations. | |
| int | rotor_indices [4] |
| Array of current rotor indices. | |
| int | rotor_flag |
| Flag indicating rotor behavior. | |
| int | rotor_count |
| Number of rotors in use. | |
| const EnigmaReflector * | reflector |
| Pointer to reflector configuration. | |
| char | plugboard [27] |
| String representing plugboard settings. | |
Represents the state and configuration of an Enigma machine.
This structure holds the rotors, reflector, and plugboard settings for an Enigma machine. It supports up to 4 rotors and includes fields for the rotor count and a flag for rotor behavior.
The plugboard is represented as a string of character pairs, where each pair indicates two letters that are swapped during encoding.
Example plugboard configuration: "ABCD" means A<->B and C<->D are swapped.
| char plugboard[27] |
String representing plugboard settings.
| const EnigmaReflector* reflector |
Pointer to reflector configuration.
| int rotor_count |
Number of rotors in use.
| int rotor_flag |
Flag indicating rotor behavior.
| int rotor_indices[4] |
Array of current rotor indices.
| const EnigmaRotor* rotors[4] |
Array of pointers to rotor configurations.