commit 3b06da43fccb4b40b268cc2ceb6af9f129f420e2 parent f5f6bb3c0891c14a522dde037b3dba5708ad325d Author: Jared Tobin <jared@jtobin.io> Date: Mon, 10 Mar 2025 16:27:14 +0400 test: passing A.3 #1 Diffstat:
M | test/Main.hs | | | 12 | ++++++++++++ |
1 file changed, 12 insertions(+), 0 deletions(-)
diff --git a/test/Main.hs b/test/Main.hs @@ -12,6 +12,7 @@ import qualified Test.Tasty.HUnit as H main :: IO () main = defaultMain $ testGroup "ppad-poly1305" [ mac + , mac0 ] mac :: TestTree @@ -25,3 +26,14 @@ mac = H.testCase "mac" $ do o = Poly1305.mac key msg H.assertEqual mempty e o +mac0 :: TestTree +mac0 = H.testCase "mac (A.3 #1)" $ do + let Just key = B16.decode + "0000000000000000000000000000000000000000000000000000000000000000" + Just msg = B16.decode + "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + Just tag = B16.decode + "00000000000000000000000000000000" + out = Poly1305.mac key msg + H.assertEqual mempty tag out +