module Codec.Crypto.AES(
Mode(..), Direction(..), crypt, crypt'
) where
import qualified Codec.Crypto.AES.Monad as AES
import Codec.Crypto.AES.Monad(Mode(..), Direction(..))
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as BL
crypt :: Mode
-> B.ByteString
-> B.ByteString
-> Direction
-> BL.ByteString
-> BL.ByteString
crypt mode key iv dir bs = snd $ AES.runAES mode key iv dir (AES.crypt bs)
crypt' :: Mode
-> B.ByteString
-> B.ByteString
-> Direction
-> B.ByteString
-> B.ByteString
crypt' mode key iv dir bs = B.concat $ BL.toChunks $ snd $ AES.runAES mode key iv dir (AES.crypt bs)