{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeFamilies #-}
module Cardano.Crypto.Hash.NeverUsed (NeverHash) where

import Cardano.Crypto.Hash.Class

-- | HASH never used
--
-- Will throw a runtime exception when trying to hash something.
data NeverHash

instance HashAlgorithm NeverHash where
  type SizeHash NeverHash = 0
  hashAlgorithmName :: proxy NeverHash -> String
hashAlgorithmName proxy NeverHash
_ = String
"never"
  digest :: proxy NeverHash -> ByteString -> ByteString
digest = String -> proxy NeverHash -> ByteString -> ByteString
forall a. HasCallStack => String -> a
error String
"HASH not available"