aboutsummaryrefslogtreecommitdiff
path: root/metadata/config_test.go
diff options
context:
space:
mode:
authorJoe Richey <joerichey@google.com>2022-08-26 23:40:44 -0700
committerEric Biggers <ebiggers3@gmail.com>2022-12-04 14:36:56 -0800
commit7ae302aa0dba1d1ea4bbeffae1917792722460c8 (patch)
tree004506ed6c20f1deee7aac1c11aa1c9a5c1a73ee /metadata/config_test.go
parent30c4e497c609f0244cc9f98bc004c13a324c9f54 (diff)
Add truncation_fixed field to HashingCosts
This allows us to fix the bug where Parallelism is inadvertantly truncated to 8 bits in a backwards compatible way. Signed-off-by: Joe Richey <joerichey@google.com>
Diffstat (limited to 'metadata/config_test.go')
-rw-r--r--metadata/config_test.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/metadata/config_test.go b/metadata/config_test.go
index f8cb7fb..3048757 100644
--- a/metadata/config_test.go
+++ b/metadata/config_test.go
@@ -30,9 +30,10 @@ import (
var testConfig = &Config{
Source: SourceType_custom_passphrase,
HashCosts: &HashingCosts{
- Time: 10,
- Memory: 1 << 12,
- Parallelism: 8,
+ Time: 10,
+ Memory: 1 << 12,
+ Parallelism: 8,
+ TruncationFixed: true,
},
Options: DefaultOptions,
}
@@ -42,7 +43,8 @@ var testConfigString = `{
"hash_costs": {
"time": "10",
"memory": "4096",
- "parallelism": "8"
+ "parallelism": "8",
+ "truncation_fixed": true
},
"options": {
"padding": "32",