Skip to content

Instantly share code, notes, and snippets.

@cartazio
Created August 21, 2019 17:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cartazio/f2aa22137d3223d9c56b09ae8e088232 to your computer and use it in GitHub Desktop.
Save cartazio/f2aa22137d3223d9c56b09ae8e088232 to your computer and use it in GitHub Desktop.
module Main where
import Data.Word
import Data.Int
import Foreign.Ptr
import Foreign.C.Types
main = c_MD5Final `seq` print "yay"
data MD5Context
foreign import ccall unsafe "__hsbase_MD5Init"
c_MD5Init :: Ptr MD5Context -> IO ()
foreign import ccall unsafe "__hsbase_MD5Update"
c_MD5Update :: Ptr MD5Context -> Ptr Word8 -> CInt -> IO ()
foreign import ccall unsafe "__hsbase_MD5Final"
c_MD5Final :: Ptr Word8 -> Ptr MD5Context -> IO ()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment