-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Fast AES encryption/decryption for bytestrings -- -- A simplified binding to Brian Gladman's AES implementation, including -- a copy of that implementation @package SimpleAES @version 0.2 -- | A pure interface to AES module Codec.Crypto.SimpleAES -- | Modes ECB and CBC can only handle full 16-byte frames. This means the -- length of every strict bytestring passed in must be a multiple of 16; -- when using lazy bytestrings, its component strict bytestrings -- must all satisfy this. data Mode ECB :: Mode CBC :: Mode data Direction Encrypt :: Direction Decrypt :: Direction type Key = ByteString type IV = ByteString newIV :: IO IV randomKey :: IO Key -- | Encryption/decryption for lazy bytestrings Properties: x == y => -- crypt mode key iv dir x == crypt mode key iv dir y take (length x) -- (crypt mode key iv Decrypt (crypt mode key iv Encrypt x)) == x crypt :: Mode -> Key -> IV -> Direction -> ByteString -> ByteString