crypto-classical-0.0.3: An educational tool for studying classical cryptography schemes.

Copyright(c) Colin Woodbury, 2015
LicenseBSD3
MaintainerColin Woodbury <colingw@gmail.com>
Safe HaskellNone
LanguageHaskell2010

Crypto.Classical.Cipher.Stream

Description

 

Synopsis

Documentation

newtype Stream a Source

A Cipher with pseudorandom keys as long as the plaintext. Since Haskell is lazy, our keys here are actually of infinite length.

If for whatever reason a key of finite length is given to encrypt, the ciphertext is cutoff to match the key length. Example:

>>> encrypt [1,2,3] "ABCDEF" ^. stream
"BDF"

Constructors

Stream 

Fields

_stream :: a
 

stream :: forall a a. Iso (Stream a) (Stream a) a a Source