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

Represents a rotor configuration for the Enigma machine. More...

#include <rotor.h>

Data Fields

const char * name
 Name of the rotor.
 
int fwd_indices [26]
 Character code of each standard alphabetic character in the rotor's alphabet.
 
int rev_indices [26]
 Character code of each rotor's alphabetic character in the standard alphabet.
 
int notches [2]
 Array of notch positions.
 
int notches_count
 Number of notches.
 

Detailed Description

Represents a rotor configuration for the Enigma machine.

Indices here are entered manually to avoid extra calculation at runtime. Essentially, they map the rotor's alphabet to the standard alphabet (A-Z).

Field Documentation

◆ fwd_indices

int fwd_indices[26]

Character code of each standard alphabetic character in the rotor's alphabet.

◆ name

const char* name

Name of the rotor.

◆ notches

int notches[2]

Array of notch positions.

◆ notches_count

int notches_count

Number of notches.

◆ rev_indices

int rev_indices[26]

Character code of each rotor's alphabetic character in the standard alphabet.


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