libenigma
Enigma machine utility library
Loading...
Searching...
No Matches
Enigma Struct Reference

Represents the state and configuration of an Enigma machine. More...

#include <enigma.h>

Data Fields

const EnigmaRotorrotors [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 EnigmaReflectorreflector
 Pointer to reflector configuration.
 
char plugboard [27]
 String representing plugboard settings.
 

Detailed Description

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.

Field Documentation

◆ plugboard

char plugboard[27]

String representing plugboard settings.

◆ reflector

const EnigmaReflector* reflector

Pointer to reflector configuration.

◆ rotor_count

int rotor_count

Number of rotors in use.

◆ rotor_flag

int rotor_flag

Flag indicating rotor behavior.

◆ rotor_indices

int rotor_indices[4]

Array of current rotor indices.

◆ rotors

const EnigmaRotor* rotors[4]

Array of pointers to rotor configurations.


The documentation for this struct was generated from the following file: