Remove unnecessary verify_string_with_params wrapper#240
Merged
Conversation
Co-authored-by: fergusfinn <6034059+fergusfinn@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Refactor to remove wrapper based on PR review feedback
Remove unnecessary verify_string_with_params wrapper
Nov 26, 2025
fergusfinn
added a commit
that referenced
this pull request
Nov 26, 2025
…239) * feat: make Argon2 parameters configurable for faster test execution This change makes Argon2 password hashing parameters (memory, iterations, parallelism) configurable through PasswordConfig, with weak defaults in test environments for dramatically faster test execution. ## Changes - Added `argon2_memory_kib`, `argon2_iterations`, and `argon2_parallelism` to `PasswordConfig` (defaults: 19MB, 2 iterations, 1 thread for production) - Test config uses weak params (128KB, 1 iteration) for fast execution - Updated all password hashing calls to use configurable parameters - Added `hash_string_with_params()` function to accept custom Argon2 params ## Performance Impact Auth test suite with coverage: - Before (19MB, 2 iter): 15.38s - After (128KB, 1 iter): 0.67s - **23x faster** test execution with coverage This resolves the issue where `cargo llvm-cov` was significantly slower than `cargo test` due to instrumenting Argon2's internal hashing loops. Tests now run faster even with coverage enabled. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Remove unnecessary verify_string_with_params wrapper (#240) * Initial plan * refactor: remove unnecessary verify_string_with_params wrapper Co-authored-by: fergusfinn <6034059+fergusfinn@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: fergusfinn <6034059+fergusfinn@users.noreply.github.com> --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: fergusfinn <6034059+fergusfinn@users.noreply.github.com>
hachall
pushed a commit
that referenced
this pull request
Jan 23, 2026
…239) * feat: make Argon2 parameters configurable for faster test execution This change makes Argon2 password hashing parameters (memory, iterations, parallelism) configurable through PasswordConfig, with weak defaults in test environments for dramatically faster test execution. ## Changes - Added `argon2_memory_kib`, `argon2_iterations`, and `argon2_parallelism` to `PasswordConfig` (defaults: 19MB, 2 iterations, 1 thread for production) - Test config uses weak params (128KB, 1 iteration) for fast execution - Updated all password hashing calls to use configurable parameters - Added `hash_string_with_params()` function to accept custom Argon2 params ## Performance Impact Auth test suite with coverage: - Before (19MB, 2 iter): 15.38s - After (128KB, 1 iter): 0.67s - **23x faster** test execution with coverage This resolves the issue where `cargo llvm-cov` was significantly slower than `cargo test` due to instrumenting Argon2's internal hashing loops. Tests now run faster even with coverage enabled. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Remove unnecessary verify_string_with_params wrapper (#240) * Initial plan * refactor: remove unnecessary verify_string_with_params wrapper Co-authored-by: fergusfinn <6034059+fergusfinn@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: fergusfinn <6034059+fergusfinn@users.noreply.github.com> --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: fergusfinn <6034059+fergusfinn@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses review feedback on #239 to remove a pointless wrapper function.
verify_string_with_paramswas unnecessary because Argon2 verification always extracts parameters from the hash itself—the params argument was ignored.Changes
verify_string_with_paramsfunctionverify_string✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.