Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,8 @@
import Data.Digest.OpenSSL.MD5 (md5sum)
import Data.ByteString (pack)
import Data.Char (ord)
main = do
let message = "The quick brown fox jumped over the lazy dog's back"
digest = (md5sum . pack . map (fromIntegral . ord)) message
putStrLn digest

View file

@ -0,0 +1,9 @@
#!/usr/bin/env runhaskell
import Data.ByteString.Char8 (pack)
import System.Environment (getArgs)
import Crypto.Hash
main :: IO ()
main = print . md5 . pack . unwords =<< getArgs
where md5 x = hash x :: Digest MD5