-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | cryptohash conduit
--   
--   Support all the cryptohash package using conduits from the
--   conduit package.
@package cryptohash-conduit
@version 0.1.1

-- | A module containing Conduit facilities for hash based functions.
--   
--   this module is vaguely similar to the crypto-conduit part related to
--   hash on purpose, as to provide an upgrade path. The api documentation
--   is pulled directly from this package and adapted, and thus are
--   originally copyright Felipe Lessa.
module Crypto.Hash.Conduit

-- | A Sink that hashes a stream of ByteStrings and
--   creates a digest d.
sinkHash :: (Monad m, HashAlgorithm hash) => Consumer ByteString m (Digest hash)

-- | Hashes the whole contents of the given file in constant memory. This
--   function is just a convenient wrapper around sinkHash defined
--   as:
--   
--   
--   hashFile fp = liftIO $ runResourceT (sourceFile fp $$ sinkHash)
--   
hashFile :: (MonadIO m, HashAlgorithm hash) => FilePath -> m (Digest hash)
