Open colindean opened 9 years ago
I'd like to use JSON that would end up looking something like this:
{"enigma": {
"plugboard": {
"A": "B",
...
},
"reflector": {
"A": "B",
...
},
"rotors": [
{ "A": "B", "B":"C"},
{ "A": "B", "B":"C"},
{ "A": "B", "B":"C"},
]
}}
Or, it could be in two files, to be more like the Enigma: distribute a plugboard/reflector file and distribute a set of rotors separately.
Messed around a little with json4s and some others. The interface is best on json4s, but it will require more than just a .toJson
call to make it right.
I think I'll need something like a LetterMapSerializer
that can turn each mapping's internal Map
into JSON cleanly.
Output the state of the Enigma before any crypt operation is performed.