Created
May 13, 2011 18:39
-
-
Save bradclawsie/971052 to your computer and use it in GitHub Desktop.
minimal simpleAES example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main (main) where | |
import Codec.Crypto.SimpleAES | |
import Data.ByteString.Lazy as L | |
import Data.ByteString.Lazy.Char8 as L8 | |
import Data.ByteString.Char8 as B8 | |
main = do | |
let lstr = L.concat [L8.pack "hi there"] | |
pw = B8.pack "abc123abc1234567" | |
lencode2 <- encryptMsg CBC pw lstr | |
print lencode2 | |
let ldecode2 = decryptMsg CBC pw lencode2 | |
print ldecode2 | |
print lstr | |
return () |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment