From 7ae302aa0dba1d1ea4bbeffae1917792722460c8 Mon Sep 17 00:00:00 2001 From: Joe Richey Date: Fri, 26 Aug 2022 23:40:44 -0700 Subject: 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 --- metadata/config_test.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'metadata/config_test.go') 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", -- cgit v1.2.3