The class EnigmaRotor implements an enigma machine rotor. It requires the helper classes EnigmaConfig.
__init__(config,rotor_name,rotor_start)
initialize and return an EnigmaRotor object.
config EnigmaConfig object.
rotor_name name of rotor (list) to use. (From EnigmaConfig object.)
rotor_start rotor starting index.
rtol_substitution(idx)
Used for character substitution when passing through the rotor right-to-left.
Input is a list index; Output is a different list index.
ltor_substitution(idx)
Used for character substitution when passing through the rotor left-to-right.
Input is a list index; Output is a different list index.
reset(rotor_name,rotor_start)
rotor_name name of rotor (list) to use. (From EnigmaConfig object.)
rotor_start rotor starting index.
display(title,all)
Display rotor's internal data.
title (optional) String or None. Title to display.
all (optional) True or False. Display complete internal data.