From fcff2578dc0f92112778c08e24b03eeb95267b48 Mon Sep 17 00:00:00 2001 From: Kamron Batman <3953314+kamronbatman@users.noreply.github.com> Date: Fri, 7 Aug 2026 16:56:28 -0700 Subject: [PATCH] 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) --- .../Tests/Accounting/Security/PasswordProtectionTest.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Projects/UOContent.Tests/Tests/Accounting/Security/PasswordProtectionTest.cs b/Projects/UOContent.Tests/Tests/Accounting/Security/PasswordProtectionTest.cs index 3fe83c9ac..1a6e08f6f 100644 --- a/Projects/UOContent.Tests/Tests/Accounting/Security/PasswordProtectionTest.cs +++ b/Projects/UOContent.Tests/Tests/Accounting/Security/PasswordProtectionTest.cs @@ -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 )