-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Fast RC4 cipher implementation -- -- Fast RC4 cipher implementation @package cipher-rc4 @version 0.1.2 -- | Simple implementation of the RC4 stream cipher. -- http:en.wikipedia.orgwikiRC4 -- -- Initial FFI implementation by Peter White peter@janrain.com -- -- Reorganized and simplified to have an opaque context. module Crypto.Cipher.RC4 -- | The encryption context for RC4 newtype Ctx Ctx :: ByteString -> Ctx -- | RC4 context initialization. -- -- seed the context with an initial key. the key size need to be adequate -- otherwise security takes a hit. initCtx :: ByteString -> Ctx -- | generate the next len bytes of the rc4 stream without combining it to -- anything. generate :: Ctx -> Int -> (Ctx, ByteString) -- | RC4 xor combination of the rc4 stream with an input combine :: Ctx -> ByteString -> (Ctx, ByteString) -- | Deprecated: use combine instead encrypt :: Ctx -> ByteString -> (Ctx, ByteString) -- | Deprecated: use combine instead decrypt :: Ctx -> ByteString -> (Ctx, ByteString) instance Show Ctx