Portability | Good |
---|---|
Stability | experimental |
Maintainer | Vincent Hanquez <vincent@snarc.org> |
- 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
initCtx :: [Word8] -> CtxSource
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