| Copyright | (c) Colin Woodbury, 2015 |
|---|---|
| License | BSD3 |
| Maintainer | Colin Woodbury <colingw@gmail.com> |
| Safe Haskell | None |
| Language | Haskell2010 |
Crypto.Classical.Cipher.Enigma
Description
Documentation
Instances
| Monad Enigma | |
| Functor Enigma | |
| Applicative Enigma | |
| Cipher EnigmaKey Enigma | 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) | |
| Show a => Show (Enigma a) |
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.