aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGravatar Benjamin Barenblat <bbaren@google.com>2018-09-04 12:27:10 -0500
committerGravatar Benjamin Barenblat <bbaren@google.com>2018-09-04 12:27:10 -0500
commit67b5043c69648f0e4b9d9138a03cce154c20e38d (patch)
tree9c73bceb27205c112fe97fad14eae6683e2d8d41 /tests
parentfadd7434be6bfc11483dc188aa6e4267e01d5c40 (diff)
Documentation improvements
Diffstat (limited to 'tests')
-rw-r--r--tests/Data/HMACTests.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/Data/HMACTests.hs b/tests/Data/HMACTests.hs
index ea786c0..bcdd7a6 100644
--- a/tests/Data/HMACTests.hs
+++ b/tests/Data/HMACTests.hs
@@ -23,7 +23,7 @@ import Test.Tasty (TestTree, testGroup)
import Test.Tasty.HUnit ((@?=), testCase)
import Data.Digest (md5, sha1, sha224, sha256, sha384, sha512)
-import Data.HMAC (Result, SecretKey(SecretKey), hmac)
+import Data.HMAC (Error, SecretKey(SecretKey), hmac)
type LazyByteString = ByteString.Lazy.ByteString
@@ -35,7 +35,7 @@ tests = testGroup "Data.HMAC"
]
tableTestCase ::
- (SecretKey -> LazyByteString -> Result String)
+ (SecretKey -> LazyByteString -> Either [Error] String)
-> (SecretKey, LazyByteString, String)
-> TestTree
tableTestCase f (key, input, output) =
@@ -176,7 +176,7 @@ testRFC4231 = testGroup "RFC 4231" $
truncatedRFC4231Test =
let key = SecretKey (ByteString.replicate 20 0x0c)
input = "Test With Truncation" :: LazyByteString
- t f = take 32 <$> f key input :: Result String
+ t f = take 32 <$> f key input :: Either [Error] String
in testGroup (abbreviate input)
[ testCase "SHA-224" (t hmacSha224 @?= Right "0e2aea68a90c8d37c988bcdb9fca6fa8")
, testCase "SHA-256" (t hmacSha256 @?= Right "a3b6167473100ee06e0c796c2955552b")