module Crypto.Ethereum.Utils where
import Crypto.Hash (Keccak_256 (..), hashWith)
import Data.ByteArray (ByteArray, ByteArrayAccess, convert)
keccak256 :: (ByteArrayAccess bin, ByteArray bout) => bin -> bout
{-# INLINE keccak256 #-}
keccak256 :: bin -> bout
keccak256 = Digest Keccak_256 -> bout
forall bin bout.
(ByteArrayAccess bin, ByteArray bout) =>
bin -> bout
convert (Digest Keccak_256 -> bout)
-> (bin -> Digest Keccak_256) -> bin -> bout
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Keccak_256 -> bin -> Digest Keccak_256
forall ba alg.
(ByteArrayAccess ba, HashAlgorithm alg) =>
alg -> ba -> Digest alg
hashWith Keccak_256
Keccak_256