code for generating enigma puzzle

This commit is contained in:
Simon Pirkelmann 2020-01-28 18:46:13 +01:00
parent fdb7b78b24
commit 79054a5325

16
enigma/main.py Normal file
View File

@ -0,0 +1,16 @@
from enigma.machine import EnigmaMachine
# setup machine according to specs from a daily key sheet:
rotors = 'II V I'
machine = EnigmaMachine.from_key_sheet(
rotors=rotors,
reflector='B',
ring_settings=[12, 3, 5],
plugboard_settings='')
cipher = machine.process_text('WIEXSCHOENXDOCHXDASXWETTERXHEUTEXISTXDENXGANZENXTAGXREGENXDERXVOUCHERXISTXALANTURING')
print(cipher)