Copyright | (c) Colin Woodbury 2015 - 2020 |
---|---|
License | BSD3 |
Maintainer | Colin Woodbury <colin@fosskers.ca> |
Safe Haskell | None |
Language | Haskell2010 |
Documentation
Instances
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. |
Defined in Crypto.Classical.Cipher.Enigma encrypt :: EnigmaKey -> ByteString -> Enigma ByteString Source # decrypt :: EnigmaKey -> ByteString -> Enigma ByteString Source # | |
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.