Copyright | (c) Colin Woodbury, 2015 |
---|---|
License | BSD3 |
Maintainer | Colin Woodbury <colingw@gmail.com> |
Safe Haskell | None |
Language | Haskell2010 |
Documentation
Monad Enigma Source | |
Functor Enigma Source | |
Applicative Enigma Source | |
Cipher EnigmaKey Enigma Source | When a machine operator presses a key, the Rotors rotate. A circuit is then completed as they hold the key down, and a bulb is lit. Here, we make sure to rotate the Rotors before encrypting the character. NOTE: Decryption is the same as encryption. |
Eq a => Eq (Enigma a) Source | |
Show a => Show (Enigma a) Source |
withInitPositions :: EnigmaKey -> EnigmaKey Source
Applies the initial Rotor settings as defined in the Key to the Rotors themselves. These initial rotations do not trigger the turnover of neighbouring Rotors as usual.