code for generating enigma puzzle
This commit is contained in:
parent
fdb7b78b24
commit
79054a5325
16
enigma/main.py
Normal file
16
enigma/main.py
Normal 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)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user