-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Symmetrical Block and Stream Ciphers -- -- Symmetrical Block and Stream Ciphers @package cryptocipher @version 0.1 -- | this only cover Camellia 128 bits for now, API will change once 192 -- and 256 mode are implemented too module Crypto.Cipher.Camellia data Key Key :: Vector Word64 -> Vector Word64 -> Vector Word64 -> Key k :: Key -> Vector Word64 kw :: Key -> Vector Word64 ke :: Key -> Vector Word64 initKey :: [Word8] -> Either String Key -- | encrypt with the key a bytestring and returns the encrypted bytestring encrypt :: Key -> ByteString -> ByteString -- | decrypt with the key a bytestring and returns the encrypted bytestring decrypt :: Key -> ByteString -> ByteString instance Show Key instance Show Word128 instance Eq Word128 module Crypto.Cipher.RC4 type Ctx = (Vector Word8, Word8, Word8) -- | initCtx initialize the Ctx with the key as parameter. the key can be -- of any size but not empty initCtx :: [Word8] -> Ctx -- | encrypt with the current context a bytestring and returns a new -- context and the resulted encrypted bytestring encrypt :: Ctx -> ByteString -> (Ctx, ByteString) -- | decrypt with the current context a bytestring and returns a new -- context and the resulted decrypted bytestring decrypt :: Ctx -> ByteString -> (Ctx, ByteString) -- | encrypt with the current context a lazy bytestring and returns a new -- context and the resulted lencrypted lazy bytestring encryptlazy :: Ctx -> ByteString -> (Ctx, ByteString) -- | decrypt with the current context a lazy bytestring and returns a new -- context and the resulted decrypted lazy bytestring decryptlazy :: Ctx -> ByteString -> (Ctx, ByteString)