diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-08-31 12:48:11 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-08-31 12:48:11 -0400 |
commit | 176dbd5798a7def03ea6c61713a0c216ab1e1674 (patch) | |
tree | 4d744dbe75b75a6bda291042a2a655cfcf415c03 | |
parent | 298c2922dd59acb9e0894168df4a1f28bf853e1b (diff) | |
download | keysafe-176dbd5798a7def03ea6c61713a0c216ab1e1674.tar.gz |
comment
-rw-r--r-- | ExpensiveHash.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ExpensiveHash.hs b/ExpensiveHash.hs index ddb7eaa..b46b23c 100644 --- a/ExpensiveHash.hs +++ b/ExpensiveHash.hs @@ -53,6 +53,8 @@ benchmarkExpensiveHash rounds tunables@(UseArgon2 _ hashopts) expected = do <$> getNumCores start <- getCurrentTime forM_ [1..rounds] $ \n -> do + -- Must vary the data being hashed to avoid laziness + -- caching hash results. let base = BU8.fromString (show n) let ExpensiveHash _ t = expensiveHash tunables (Salt (GpgKey (KeyId (base <> "dummy")))) |