module Crypto.Hash (
HashAlgorithm(..)
, SHA1
, SHA224
, SHA256
, SHA384
, SHA512
, MD5
, Whirlpool
, hash
, hashLazy
) where
import qualified Data.ByteString.Lazy as LBS
import Data.ByteString (ByteString)
import Crypto.Hash.ADT
import Crypto.Hash.SHA1
import Crypto.Hash.SHA256
import Crypto.Hash.SHA512
import Crypto.Hash.MD5
import Crypto.Hash.Whirlpool
hash :: (HashAlgorithm a) => ByteString -> a
hash :: forall a. HashAlgorithm a => ByteString -> a
hash = forall a. HashAlgorithm a => Context a -> a
hashFinal forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. HashAlgorithm a => Context a -> ByteString -> Context a
hashUpdate forall a. HashAlgorithm a => Context a
hashInit
hashLazy :: (HashAlgorithm a) => LBS.ByteString -> a
hashLazy :: forall a. HashAlgorithm a => ByteString -> a
hashLazy = forall a. HashAlgorithm a => Context a -> a
hashFinal forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. (a -> ByteString -> a) -> a -> ByteString -> a
LBS.foldlChunks forall a. HashAlgorithm a => Context a -> ByteString -> Context a
hashUpdate forall a. HashAlgorithm a => Context a
hashInit