License | BSD-style |
---|---|
Stability | experimental |
Portability | Unix |
Safe Haskell | None |
Language | Haskell2010 |
Small Ad-Hoc bindings to AES-GCM encryption and decryption function.
Doesn't support incremental mode yet.
TODO: full fledge AES bindings (CBC, CTR, GCM...), with incremental processing.
- isSupportedGCM :: Bool
- encryptGCM :: ByteString -> ByteString -> ByteString -> ByteString -> ByteString
- decryptGCM :: ByteString -> ByteString -> ByteString -> ByteString -> Maybe ByteString
- newtype OpenSSLGcmError = OpenSSLGcmError String
Documentation
isSupportedGCM :: Bool Source #
Get whether the OpenSSL version linked supports GCM mode (at least 1.0.x and above)
:: ByteString | Key |
-> ByteString | IV |
-> ByteString | Header (Authenticated input, will be not be copied to output) |
-> ByteString | Plaintext to encrypt |
-> ByteString | Encrypted input including the authentication tag (but not the header) |
One shot function to GCM data without any incremental handling
:: ByteString | Key |
-> ByteString | IV |
-> ByteString | Header (Authenticated input) |
-> ByteString | Encrypted data |
-> Maybe ByteString | Decrypted data if authentication successful |
One shot function to decrypt GCM data without any incremental handling