test(accounts): add a type-only row to the NeedsRehash cost matrix

The existing "old shipping default" row (argon2i, m=8192, t=3) changed type,
memory and time all at once, so it did not independently prove the ArgonType
comparison was load-bearing -- deleting that clause would have left the row
passing on the memory/time checks alone. Add a row that isolates the type
dimension against the current-defaults baseline, alongside the ones that
already isolate memory, iterations and parallelism.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Kamron Batman 2026-08-07 16:56:28 -07:00
parent e284227557
commit fcff2578dc

View file

@ -94,6 +94,7 @@ public class PasswordProtectionTest
[InlineData("argon2id", 8192, 1, 1, true)] // right type, stale memory
[InlineData("argon2id", 16384, 3, 1, true)] // right type, stale iterations
[InlineData("argon2id", 16384, 1, 2, true)] // right type, stale parallelism
[InlineData("argon2i", 16384, 1, 1, true)] // right cost, stale type
public void Argon2_NeedsRehash_ComparesTypeAndCost(
string type, int memory, int time, int parallelism, bool expected
)