From 09e83a7f681a2f1f23b5ecea45676d93036c8f53 Mon Sep 17 00:00:00 2001 From: Vincent Hanquez Date: Sat, 2 May 2015 05:40:47 +0100 Subject: [PATCH] [hash] fix hash printing --- tests/KATHash.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/KATHash.hs b/tests/KATHash.hs index cb3a3cd..1a7b409 100644 --- a/tests/KATHash.hs +++ b/tests/KATHash.hs @@ -8,6 +8,7 @@ module KATHash import Crypto.Hash import qualified Data.ByteString as B +import qualified Crypto.Internal.ByteArray as B (convertHex) import Imports v0,v1,v2 :: ByteString @@ -141,8 +142,8 @@ expected = [ "28e361fe8c56e617caa56c28c7c36e5c13be552b77081be82b642f08bb7ef085b9a81910fe98269386b9aacfd2349076c9506126e198f6f6ad44c12017ca77b1" ]) ] -runhash (HashAlg hashAlg) v = digestToHexByteString $ hashWith hashAlg $ v -runhashinc (HashAlg hashAlg) v = digestToHexByteString $ hashinc $ v +runhash (HashAlg hashAlg) v = B.convertHex $ hashWith hashAlg $ v +runhashinc (HashAlg hashAlg) v = B.convertHex $ hashinc $ v where hashinc = hashFinalize . foldl hashUpdate (hashInitWith hashAlg) makeTestAlg (name, hashAlg, results) =