enigma.plug_lead¶
-
class
enigma.plug_lead.
PlugLead
(mapping: str)¶ Creates a new plug lead for an Enigma machine
- Parameters
mapping – Character mapping for this lead, specified as a string with two characters
-
can_encode
(character: str)¶ Return True if the given character can be encoded using this lead
-
encode
(character: str)¶ Encode a character using this lead. If it’s not actually setup to convert this character it just returns it unchanged