{-# LANGUAGE TypeApplications #-}
module Data.ByteString.Hash
( sha2_256
, sha3_256
, blake2b_256
) where
import Cardano.Crypto.Hash.Blake2b
import Cardano.Crypto.Hash.Class
import Cardano.Crypto.Hash.SHA256
import Cardano.Crypto.Hash.SHA3_256
import Data.ByteString qualified as BS
import Data.Proxy
sha2_256 :: BS.ByteString -> BS.ByteString
sha2_256 :: ByteString -> ByteString
sha2_256 = Proxy SHA256 -> ByteString -> ByteString
forall h (proxy :: * -> *).
HashAlgorithm h =>
proxy h -> ByteString -> ByteString
digest (Proxy SHA256
forall k (t :: k). Proxy t
Proxy @SHA256)
sha3_256 :: BS.ByteString -> BS.ByteString
sha3_256 :: ByteString -> ByteString
sha3_256 = Proxy SHA3_256 -> ByteString -> ByteString
forall h (proxy :: * -> *).
HashAlgorithm h =>
proxy h -> ByteString -> ByteString
digest (Proxy SHA3_256
forall k (t :: k). Proxy t
Proxy @SHA3_256)
blake2b_256 :: BS.ByteString -> BS.ByteString
blake2b_256 :: ByteString -> ByteString
blake2b_256 = Proxy Blake2b_256 -> ByteString -> ByteString
forall h (proxy :: * -> *).
HashAlgorithm h =>
proxy h -> ByteString -> ByteString
digest (Proxy Blake2b_256
forall k (t :: k). Proxy t
Proxy @Blake2b_256)