cryptocipher-0.3.1: Symmetrical Block, Stream and PubKey Ciphers

LicenseBSD-style
MaintainerVincent Hanquez <vincent@snarc.org>
Stabilityexperimental
PortabilityGood
Safe HaskellNone
LanguageHaskell98

Crypto.Cipher.RC4

Description

 

Synopsis

Documentation

initCtx :: [Word8] -> Ctx Source

initCtx initialize the Ctx with the key as parameter. the key can be of any size but not empty

encrypt :: Ctx -> ByteString -> (Ctx, ByteString) Source

encrypt with the current context a bytestring and returns a new context and the resulted encrypted bytestring

decrypt :: Ctx -> ByteString -> (Ctx, ByteString) Source

decrypt with the current context a bytestring and returns a new context and the resulted decrypted bytestring

encryptlazy :: Ctx -> ByteString -> (Ctx, ByteString) Source

encrypt with the current context a lazy bytestring and returns a new context and the resulted lencrypted lazy bytestring

decryptlazy :: Ctx -> ByteString -> (Ctx, ByteString) Source

decrypt with the current context a lazy bytestring and returns a new context and the resulted decrypted lazy bytestring