SHA2-0.2.0: Fast, incremental SHA hashing for bytestringsSource codeContentsIndex
Codec.Digest.SHA.Monad
Description
A safe interface to SHA that still lets you digest incrementally
Synopsis
type SHA s a = SHAT (ST s) a
type SHAT m a = ReaderT SHACtx m a
data Length
= SHA256
| SHA384
| SHA512
runSHAT :: MonadUnsafeIO m => Length -> SHAT m a -> m (a, ByteString)
runSHA :: Length -> (forall s. SHA s a) -> (a, ByteString)
class Hashable a where
update :: MonadUnsafeIO m => a -> SHAT m ()
showBSasHex :: ByteString -> String
Documentation
type SHA s a = SHAT (ST s) aSource
type SHAT m a = ReaderT SHACtx m aSource
data Length Source
Constructors
SHA256
SHA384
SHA512
runSHAT :: MonadUnsafeIO m => Length -> SHAT m a -> m (a, ByteString)Source
runSHA :: Length -> (forall s. SHA s a) -> (a, ByteString)Source
class Hashable a whereSource
Hash some data, combining it with everything already hashed in this context
Methods
update :: MonadUnsafeIO m => a -> SHAT m ()Source
show/hide Instances
showBSasHex :: ByteString -> StringSource
Converts a ByteString to hexadeximal string format
Produced by Haddock version 2.6.0