Copyright | (c) Colin Woodbury 2015 - 2020 |
---|---|
License | BSD3 |
Maintainer | Colin Woodbury <colin@fosskers.ca> |
Safe Haskell | None |
Language | Haskell2010 |
Documentation
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"
Instances
Monad Stream Source # | |
Functor Stream Source # | |
Applicative Stream Source # | |
Eq a => Eq (Stream a) Source # | |
Show a => Show (Stream a) Source # | |
Cipher [ℤ / 26] Stream Source # | |
Defined in Crypto.Classical.Cipher.Stream encrypt :: [ℤ / 26] -> ByteString -> Stream ByteString Source # decrypt :: [ℤ / 26] -> ByteString -> Stream ByteString Source # |