Portability | Good |
---|---|
Stability | experimental |
Maintainer | Vincent Hanquez <vincent@snarc.org> |
Safe Haskell | Safe-Infered |
- data Key
- type IV = ByteString
- encrypt :: Key -> ByteString -> ByteString
- decrypt :: Key -> ByteString -> ByteString
- encryptCBC :: Key -> IV -> ByteString -> ByteString
- decryptCBC :: Key -> IV -> ByteString -> ByteString
- initKey128, initKey256, initKey192 :: ByteString -> Either String Key
- data AES128
- data AES192
- data AES256
Documentation
type IV = ByteStringSource
Basic encryption and decryption
encrypt :: Key -> ByteString -> ByteStringSource
encrypt using simple EBC mode
decrypt :: Key -> ByteString -> ByteStringSource
decrypt using simple EBC mode
CBC encryption and decryption
encryptCBC :: Key -> IV -> ByteString -> ByteStringSource
encrypt using CBC mode - IV need to be 16 bytes and the data to encrypt a multiple of 16 bytes
decryptCBC :: Key -> IV -> ByteString -> ByteStringSource
decrypt using CBC mode - IV need to be 16 bytes and the data to decrypt a multiple of 16 bytes