A primitive interface to SHA-2
- data Length
- data SHACtx
- newCtx :: Length -> IO SHACtx
- unsafeUpdateCtx :: SHACtx -> ByteString -> IO ()
- unsafeFinalizeCtx :: SHACtx -> IO ByteString
- showBSasHex :: ByteString -> String
Documentation
unsafeUpdateCtx :: SHACtx -> ByteString -> IO ()Source
Heads up: Calling this function after calling finalizeCtx is likely to result in crashes, therefore unsafe.
unsafeFinalizeCtx :: SHACtx -> IO ByteStringSource
After calling this, you must not call either unsafeUpdateCtx or unsafeFinalizeCtx again. (On the same context)
showBSasHex :: ByteString -> StringSource
Converts a ByteString to hexadeximal string format