The Hash class is intended as the generic interface targeted by maintainers of Haskell digest implementations. Using this generic interface, higher level functions such as hash and hash' provide a useful API for comsumers of hash implementations.
Any instantiated implementation must handle unaligned data.
Minimum complete definition: outputLength, blockLength, initialCtx, updateCtx, and finalize.
Methods
outputLength :: Tagged d BitLengthblockLength :: Tagged d BitLengthinitialCtx :: ctxupdateCtx :: ctx -> ByteString -> ctxfinalize :: ctx -> ByteString -> dhash :: Hash ctx d => ByteString -> dHash a lazy ByteString, creating a digest
hash' :: Hash ctx d => ByteString -> dHash a strict ByteString, creating a digest