{-# LANGUAGE ImportQualifiedPost #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Test.Hash.SHA
(
MsgFile(..)
, MsgVector(..)
, sha1LongMsg
, sha224LongMsg
, sha256LongMsg
, sha384LongMsg
, sha512LongMsg
, sha512_224LongMsg
, sha512_256LongMsg
, sha1ShortMsg
, sha224ShortMsg
, sha256ShortMsg
, sha384ShortMsg
, sha512ShortMsg
, sha512_224ShortMsg
, sha512_256ShortMsg
, MonteFile(..)
, MonteVector(..)
, sha1Monte
, sha224Monte
, sha256Monte
, sha384Monte
, sha512Monte
, sha512_224Monte
, sha512_256Monte
, 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
3
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
3
sha1LongMsg :: MsgFile
sha1LongMsg :: MsgFile
sha1LongMsg = $$(embedMsgFile "data/shabytetestvectors/SHA1LongMsg.rsp")
sha224LongMsg :: MsgFile
sha224LongMsg :: MsgFile
sha224LongMsg = $$(embedMsgFile "data/shabytetestvectors/SHA224LongMsg.rsp")
sha256LongMsg :: MsgFile
sha256LongMsg :: MsgFile
sha256LongMsg = $$(embedMsgFile "data/shabytetestvectors/SHA256LongMsg.rsp")
sha384LongMsg :: MsgFile
sha384LongMsg :: MsgFile
sha384LongMsg = $$(embedMsgFile "data/shabytetestvectors/SHA384LongMsg.rsp")
sha512LongMsg :: MsgFile
sha512LongMsg :: MsgFile
sha512LongMsg = $$(embedMsgFile "data/shabytetestvectors/SHA512LongMsg.rsp")
sha512_224LongMsg :: MsgFile
sha512_224LongMsg :: MsgFile
sha512_224LongMsg = $$(embedMsgFile "data/shabytetestvectors/SHA512_224LongMsg.rsp")
sha512_256LongMsg :: MsgFile
sha512_256LongMsg :: MsgFile
sha512_256LongMsg = $$(embedMsgFile "data/shabytetestvectors/SHA512_256LongMsg.rsp")
sha1ShortMsg :: MsgFile
sha1ShortMsg :: MsgFile
sha1ShortMsg = $$(embedMsgFile "data/shabytetestvectors/SHA1ShortMsg.rsp")
sha224ShortMsg :: MsgFile
sha224ShortMsg :: MsgFile
sha224ShortMsg = $$(embedMsgFile "data/shabytetestvectors/SHA224ShortMsg.rsp")
sha256ShortMsg :: MsgFile
sha256ShortMsg :: MsgFile
sha256ShortMsg = $$(embedMsgFile "data/shabytetestvectors/SHA256ShortMsg.rsp")
sha384ShortMsg :: MsgFile
sha384ShortMsg :: MsgFile
sha384ShortMsg = $$(embedMsgFile "data/shabytetestvectors/SHA384ShortMsg.rsp")
sha512ShortMsg :: MsgFile
sha512ShortMsg :: MsgFile
sha512ShortMsg = $$(embedMsgFile "data/shabytetestvectors/SHA512ShortMsg.rsp")
sha512_224ShortMsg :: MsgFile
sha512_224ShortMsg :: MsgFile
sha512_224ShortMsg = $$(embedMsgFile "data/shabytetestvectors/SHA512_224ShortMsg.rsp")
sha512_256ShortMsg :: MsgFile
sha512_256ShortMsg :: MsgFile
sha512_256ShortMsg = $$(embedMsgFile "data/shabytetestvectors/SHA512_256ShortMsg.rsp")
sha1Monte :: MonteFile
sha1Monte :: MonteFile
sha1Monte = $$(embedMonteFile "data/shabytetestvectors/SHA1Monte.rsp")
sha224Monte :: MonteFile
sha224Monte :: MonteFile
sha224Monte = $$(embedMonteFile "data/shabytetestvectors/SHA224Monte.rsp")
sha256Monte :: MonteFile
sha256Monte :: MonteFile
sha256Monte = $$(embedMonteFile "data/shabytetestvectors/SHA256Monte.rsp")
sha384Monte :: MonteFile
sha384Monte :: MonteFile
sha384Monte = $$(embedMonteFile "data/shabytetestvectors/SHA384Monte.rsp")
sha512Monte :: MonteFile
sha512Monte :: MonteFile
sha512Monte = $$(embedMonteFile "data/shabytetestvectors/SHA512Monte.rsp")
sha512_224Monte :: MonteFile
sha512_224Monte :: MonteFile
sha512_224Monte = $$(embedMonteFile "data/shabytetestvectors/SHA512_224Monte.rsp")
sha512_256Monte :: MonteFile
sha512_256Monte :: MonteFile
sha512_256Monte = $$(embedMonteFile "data/shabytetestvectors/SHA512_256Monte.rsp")