aboutsummaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorJoseph Richey <joerichey@google.com>2017-08-07 11:21:13 -0700
committerGitHub <noreply@github.com>2017-08-07 11:21:13 -0700
commit8e234ec2cbbb4214ca493ddff18257f0c7605ee1 (patch)
tree28ae946279b01b222c2cb3a7f1e9ab938f910657 /actions
parent1390d76105e843dec603b5d7b8f3561b62a751a9 (diff)
parent297b46e65415c7d032844b39e7504bb862e2ea28 (diff)
Merge pull request #33 from ebiggers/fix_hashing_calibration
actions: calculate password hash difficulty correctly
Diffstat (limited to 'actions')
-rw-r--r--actions/config.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/actions/config.go b/actions/config.go
index 55010a5..81f6e4f 100644
--- a/actions/config.go
+++ b/actions/config.go
@@ -230,7 +230,7 @@ func timeHashingCosts(costs *metadata.HashingCosts) (time.Duration, error) {
}
end := cpuTimeInNanoseconds()
- return time.Duration(end - begin), nil
+ return time.Duration((end - begin) / costs.Parallelism), nil
}
// cpuTimeInNanoseconds returns the nanosecond count based on the process's CPU usage.