enigma-cli 1.0.0

A command-line interface for an Enigma machine simulator. Configurable with any reflector, number of rotors, and plugboard pairs.
Documentation
1
2
3
4
5
6
7
8
9
10
use crate::enigma_int::FromEnigmaInt;

use super::Rotor;

impl Rotor {
    pub fn get_position(&self) -> char {
        // Position is added during encoding ;)
        self.encode(0).from_internal_int()
    }
}