Crypto.Cipher.RC4

| cryptocipher-0.2: Symmetrical Block and Stream Ciphers | Contents | Index
Crypto.Cipher.RC4 |
Portability | Good
Stability | experimental
Maintainer | Vincent Hanquez <vincent@snarc.org>
Description
Synopsis
type Ctx = (Vector Word8, Word8, Word8)
initCtx :: [Word8] -> Ctx
encrypt :: Ctx -> ByteString -> (Ctx, ByteString)
decrypt :: Ctx -> ByteString -> (Ctx, ByteString)
encryptlazy :: Ctx -> ByteString -> (Ctx, ByteString)
decryptlazy :: Ctx -> ByteString -> (Ctx, ByteString)
Documentation
type Ctx = (Vector Word8, Word8, Word8)
initCtx :: [Word8] -> Ctx
initCtx initialize the Ctx with the key as parameter. the key can be of any size but not empty
encrypt :: Ctx -> ByteString -> (Ctx, ByteString)
encrypt with the current context a bytestring and returns a new context and the resulted encrypted bytestring
decrypt :: Ctx -> ByteString -> (Ctx, ByteString)
decrypt with the current context a bytestring and returns a new context and the resulted decrypted bytestring
encryptlazy :: Ctx -> ByteString -> (Ctx, ByteString)
encrypt with the current context a lazy bytestring and returns a new context and the resulted lencrypted lazy bytestring
decryptlazy :: Ctx -> ByteString -> (Ctx, ByteString)
decrypt with the current context a lazy bytestring and returns a new context and the resulted decrypted lazy bytestring
Produced by Haddock version 2.7.2