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