ACME-0.0.0.0: Essential features

Safe HaskellNone
LanguageHaskell98

Acme.Cipher

Description

Various ciphers.

Synopsis

Documentation

data Cipher key Source

encode :: Cipher t -> t -> String -> String Source

decode :: Cipher t -> t -> String -> String Source

playfair :: Cipher [Char] Source

The Playfair cipher

substitution :: Cipher [(Char, Char)] Source

The letter substitution cipher

viginere :: Cipher [Char] Source

The Viginere cipher (acts like one-time pad if the key is as long as the plaintext)

caesar :: Cipher Char Source

The Caesar cipher

newtype Plugboard Source

Constructors

Plugboard [(Char, Char)] 

newtype Reflector Source

Constructors

Reflector [(Char, Char)] 

newtype RotorMapping Source

Constructors

RotorMapping [(Char, Char)]