diff options
author | Benjamin Barenblat <bbaren@google.com> | 2018-03-23 18:34:42 -0400 |
---|---|---|
committer | Benjamin Barenblat <bbaren@google.com> | 2018-03-23 18:34:42 -0400 |
commit | 0ed87caa3481cbb6f8c2e809e5ec7df6f6245406 (patch) | |
tree | e7267e4b7996920577aa556ff7a67a312a271216 /tests/Data/Digest/Sha1Tests.hs | |
parent | 3e898da300395bc3e63780b8d27a97fd4a9c375c (diff) |
Data.Digest: Reify hash algorithms
Eliminate the functional interface for hashing. Hashing now occurs
exclusively through the `hash` function, which accepts a
`Data.Digest.Algorithm`. This makes btls somewhat less extensible, but
it’s the most elegant way to support HMACs.
Diffstat (limited to 'tests/Data/Digest/Sha1Tests.hs')
-rw-r--r-- | tests/Data/Digest/Sha1Tests.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/Data/Digest/Sha1Tests.hs b/tests/Data/Digest/Sha1Tests.hs index cd1f1c6..63c774d 100644 --- a/tests/Data/Digest/Sha1Tests.hs +++ b/tests/Data/Digest/Sha1Tests.hs @@ -11,12 +11,12 @@ import Test.Tasty.SmallCheck (testProperty) import Data.Digest.HashTests (tableTestCase, testAgainstCoreutils, testAgainstOpenssl) -import Data.Digest.Sha1 +import Data.Digest (hash, sha1) tests :: TestTree tests = testGroup - "Data.Digest.Sha1" + "SHA-1" [ testNistExamples , testGoExamples , testCoreutilsConformance @@ -107,4 +107,4 @@ testOpensslConformance = -- Convenience function. -sha1sum = show . sha1 . ByteString.Lazy.fromStrict +sha1sum = show . hash sha1 . ByteString.Lazy.fromStrict |