{-# LANGUAGE ImportQualifiedPost #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Test.Hash.SHA3
(
MsgFile(..)
, MsgVector(..)
, sha3_224LongMsg
, sha3_256LongMsg
, sha3_384LongMsg
, sha3_512LongMsg
, sha3_224ShortMsg
, sha3_256ShortMsg
, sha3_384ShortMsg
, sha3_512ShortMsg
, MonteFile(..)
, MonteVector(..)
, sha3_224Monte
, sha3_256Monte
, sha3_384Monte
, sha3_512Monte
, msgTest
, msgAssert
, monteTest
, monteAssert
) where
import Data.ByteString qualified as B
import Test.Hash.Internal
monteTest :: (B.ByteString -> B.ByteString) -> MonteFile -> Bool
monteTest :: (ByteString -> ByteString) -> MonteFile -> Bool
monteTest = Natural -> (ByteString -> ByteString) -> MonteFile -> Bool
monteTestInternal Natural
1
monteAssert
:: Monad m
=> (String -> B.ByteString -> B.ByteString -> m ())
-> (B.ByteString -> B.ByteString)
-> MonteFile
-> m ()
monteAssert :: forall (m :: * -> *).
Monad m =>
(String -> ByteString -> ByteString -> m ())
-> (ByteString -> ByteString) -> MonteFile -> m ()
monteAssert = Natural
-> (String -> ByteString -> ByteString -> m ())
-> (ByteString -> ByteString)
-> MonteFile
-> m ()
forall (m :: * -> *).
Monad m =>
Natural
-> (String -> ByteString -> ByteString -> m ())
-> (ByteString -> ByteString)
-> MonteFile
-> m ()
monteAssertInternal Natural
1
sha3_224LongMsg :: MsgFile
sha3_224LongMsg :: MsgFile
sha3_224LongMsg = $$(embedMsgFile "data/sha-3bytetestvectors/SHA3_224LongMsg.rsp")
sha3_256LongMsg :: MsgFile
sha3_256LongMsg :: MsgFile
sha3_256LongMsg = $$(embedMsgFile "data/sha-3bytetestvectors/SHA3_256LongMsg.rsp")
sha3_384LongMsg :: MsgFile
sha3_384LongMsg :: MsgFile
sha3_384LongMsg = $$(embedMsgFile "data/sha-3bytetestvectors/SHA3_384LongMsg.rsp")
sha3_512LongMsg :: MsgFile
sha3_512LongMsg :: MsgFile
sha3_512LongMsg = $$(embedMsgFile "data/sha-3bytetestvectors/SHA3_512LongMsg.rsp")
sha3_224ShortMsg :: MsgFile
sha3_224ShortMsg :: MsgFile
sha3_224ShortMsg = $$(embedMsgFile "data/sha-3bytetestvectors/SHA3_224ShortMsg.rsp")
sha3_256ShortMsg :: MsgFile
sha3_256ShortMsg :: MsgFile
sha3_256ShortMsg = $$(embedMsgFile "data/sha-3bytetestvectors/SHA3_256ShortMsg.rsp")
sha3_384ShortMsg :: MsgFile
sha3_384ShortMsg :: MsgFile
sha3_384ShortMsg = $$(embedMsgFile "data/sha-3bytetestvectors/SHA3_384ShortMsg.rsp")
sha3_512ShortMsg :: MsgFile
sha3_512ShortMsg :: MsgFile
sha3_512ShortMsg = $$(embedMsgFile "data/sha-3bytetestvectors/SHA3_512ShortMsg.rsp")
sha3_224Monte :: MonteFile
sha3_224Monte :: MonteFile
sha3_224Monte = $$(embedMonteFile "data/sha-3bytetestvectors/SHA3_224Monte.rsp")
sha3_256Monte :: MonteFile
sha3_256Monte :: MonteFile
sha3_256Monte = $$(embedMonteFile "data/sha-3bytetestvectors/SHA3_256Monte.rsp")
sha3_384Monte :: MonteFile
sha3_384Monte :: MonteFile
sha3_384Monte = $$(embedMonteFile "data/sha-3bytetestvectors/SHA3_384Monte.rsp")
sha3_512Monte :: MonteFile
sha3_512Monte :: MonteFile
sha3_512Monte = $$(embedMonteFile "data/sha-3bytetestvectors/SHA3_512Monte.rsp")