From 4fc681f78b2e659d3db3da99fe7c640416fb3b43 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 15 Sep 2016 00:26:33 -0400 Subject: Change format of ~/.keysafe/backup.log Allow deserializing SecretKeySource so we can later know what gpg keys are backed up. Converted KeyId to Text as JSON can't handle ByteString. --- Benchmark.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Benchmark.hs') diff --git a/Benchmark.hs b/Benchmark.hs index c121e17..66436fe 100644 --- a/Benchmark.hs +++ b/Benchmark.hs @@ -14,6 +14,7 @@ import HTTP.ProofOfWork import Cost import Serialization () import qualified Data.ByteString.UTF8 as BU8 +import qualified Data.Text as T import qualified Crypto.Argon2 as Argon2 import Data.Time.Clock import Control.DeepSeq @@ -41,10 +42,11 @@ benchmarkExpensiveHash' rounds tunables@(UseArgon2 _ hashopts) expected = do forM_ [1..rounds] $ \n -> do -- Must vary the data being hashed to avoid laziness -- caching hash results. - let base = BU8.fromString (show n) + let base = T.pack (show n) + let baseb = BU8.fromString (show n) let ExpensiveHash _ t = expensiveHash tunables (Salt (GpgKey (KeyId (base <> "dummy")))) - (base <> "himom") + (baseb <> "himom") t `deepseq` return () end <- getCurrentTime let diff = floor (end `diffUTCTime` start) :: Integer -- cgit v1.2.3