License | BSD-style |
---|---|
Maintainer | Vincent Hanquez <vincent@snarc.org> |
Stability | experimental |
Portability | Good |
Safe Haskell | None |
Language | Haskell98 |
Crypto.Cipher.AES
Contents
Description
- 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
Basic encryption and decryption
encrypt :: Key -> ByteString -> ByteString
encrypt using simple EBC mode
decrypt :: Key -> ByteString -> ByteString
decrypt using simple EBC mode
CBC encryption and decryption
encryptCBC :: Key -> IV -> ByteString -> ByteString
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
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
initKey192 :: ByteString -> Either String Key
initKey256 :: ByteString -> Either String Key
Wrappers for "crypto-api" instances
data AES128
Instances
data AES192
Instances
data AES256
Instances