Created
July 19, 2017 20:02
-
-
Save KentaKudo/4e0950b62bc3a1d22a8efae34c7eb8c2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var enigma = Enigma(rotor0: swissK[0], rotor1: swissK[1], rotor2: swissK[2], plugboard: plugboard, key: (.A, .A, .A)) | |
let message = "HELLOWORLD" | |
let message2 = "AAAAAAAAAA" | |
let ciphered = enigma.cipher(message) | |
let ciphered2 = enigma.cipher(message2) | |
var _enigma = Enigma(rotor0: swissK[0], rotor1: swissK[1], rotor2: swissK[2], plugboard: plugboard, key: (.A, .A, .A)) | |
let deciphered = _enigma.cipher(ciphered) | |
let deciphered2 = _enigma.cipher(ciphered2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment