cipher-aes128 alternatives and similar packages
Based on the "cipher" category.
Alternatively, view cipher-aes128 alternatives based on common mentions on social networks and blogs.
-
cipher-blowfish
DISCONTINUED. DEPRECATED by cryptonite; A collection of cryptographic block and stream ciphers in haskell -
cipher-aes
DEPRECATED - use cryptonite - a comprehensive fast AES implementation for haskell that supports aesni and advanced cryptographic modes.
CodeRabbit: AI Code Reviews for Developers
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of cipher-aes128 or a related project?
README
AES and various modes
This package, available on hackage, implements AES and various modes of operation. Despite the name, it provides AES-192 and 256 as well.
While it original started as a fork of the cipher-aes package to test a performance improvement, this package continues to be maintained due to my preference for the API (for example, also this) and the idea that faster C code will eventually be adopted.
Use
Most users will want the crypto-api
interface to generate keys and
encrypt/decrypt data:
{-# LANGUAGE OverloadedStrings #-}
import Data.ByteString
import Crypto.Cipher.AES128 (AESKey128)
import Crypto.Classes (buildKeyIO, ctr, unCtr, zeroIV)
main =
do k <- buildKeyIO :: IO AESKey128
let myMessage = "Some message or another"
(ciphertext,_nextIV) = ctr k zeroIV myMessage
(myMessage',_nextIV) = unCtr k zeroIV ciphertext
print (unpack myMessage)
print (unpack ciphertext)
print $ myMessage == myMessage'
Unless you need GCM in which case, as of writing, you'll
need to use makeGCMCtx
, encryptGCM
and decryptGCM
.