commit 422b52293ebf79f9d0ebf7e14a0bc7f9ade9e26e
parent 70ae39c80da5e1e309ff1a7c41ffcff2fa53c4a2
Author: Jared Tobin <jared@jtobin.io>
Date: Mon, 7 Oct 2024 09:28:04 +0400
test: update long key tests in lieu of ae9e0b6
Diffstat:
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/test/Main.hs b/test/Main.hs
@@ -150,12 +150,10 @@ unit_tests = testGroup "ppad-sha256" [
let out = BS.take 32 $ B16.encode (SHA256.hmac hmv5_key hmv5_put)
assertEqual mempty hmv5_pec out
, testCase "hmv6" $ do
- let keh = SHA256.hash hmv6_key
- out = B16.encode (SHA256.hmac keh hmv6_put)
+ let out = B16.encode (SHA256.hmac hmv6_key hmv6_put)
assertEqual mempty hmv6_pec out
, testCase "hmv7" $ do
- let keh = SHA256.hash hmv7_key
- out = B16.encode (SHA256.hmac keh hmv7_put)
+ let out = B16.encode (SHA256.hmac hmv7_key hmv7_put)
assertEqual mempty hmv7_pec out
]
, testGroup "hmac_lazy" [
@@ -168,14 +166,12 @@ unit_tests = testGroup "ppad-sha256" [
out = BS.take 32 $ B16.encode (SHA256.hmac_lazy hmv5_key lut)
assertEqual mempty hmv5_pec out
, testCase "hmv6" $ do
- let keh = SHA256.hash hmv6_key
- lut = BL.fromStrict hmv6_put
- out = B16.encode (SHA256.hmac_lazy keh lut)
+ let lut = BL.fromStrict hmv6_put
+ out = B16.encode (SHA256.hmac_lazy hmv6_key lut)
assertEqual mempty hmv6_pec out
, testCase "hmv7" $ do
- let keh = SHA256.hash hmv7_key
- lut = BL.fromStrict hmv7_put
- out = B16.encode (SHA256.hmac_lazy keh lut)
+ let lut = BL.fromStrict hmv7_put
+ out = B16.encode (SHA256.hmac_lazy hmv7_key lut)
assertEqual mempty hmv7_pec out
]
]