{-# LANGUAGE ForeignFunctionInterface #-} #include #include module Bindings.Nettle.Hash.SHA2 where #strict_import #num SHA256_DIGEST_SIZE #num SHA256_DATA_SIZE #starttype struct sha256_ctx #stoptype #ccall sha256_init , Ptr -> IO () #ccall sha256_update , Ptr -> CUInt -> Ptr CUChar -> IO () #ccall sha256_digest , Ptr -> CUInt -> Ptr CUChar -> IO () #num SHA224_DIGEST_SIZE #num SHA224_DATA_SIZE #starttype struct sha224_ctx #stoptype #ccall sha224_init , Ptr -> IO () #ccall sha224_digest , Ptr -> CUInt -> Ptr CUChar -> IO () #num SHA512_DIGEST_SIZE #num SHA512_DATA_SIZE #starttype struct sha512_ctx #stoptype #ccall sha512_init , Ptr -> IO () #ccall sha512_update , Ptr -> CUInt -> Ptr CUChar -> IO () #ccall sha512_digest , Ptr -> CUInt -> Ptr CUChar -> IO () #num SHA384_DIGEST_SIZE #num SHA384_DATA_SIZE #starttype struct sha384_ctx #stoptype #ccall sha384_init , Ptr -> IO () #ccall sha384_digest , Ptr -> CUInt -> Ptr CUChar -> IO ()