Skip to content

feat: match reference argon2 CLI output and zeroize password#4

Merged
joelsa merged 1 commit into
mainfrom
joelsa/reference-compat
Jul 6, 2026
Merged

feat: match reference argon2 CLI output and zeroize password#4
joelsa merged 1 commit into
mainfrom
joelsa/reference-compat

Conversation

@joelsa

@joelsa joelsa commented Jul 3, 2026

Copy link
Copy Markdown
Member
  • Hex-encode -r raw output to match reference argon2 binary
  • Read stdin verbatim to preserve trailing and inner newlines
  • Verify password with verify_password() before "Verification ok"
  • Wrap password in Zeroizing to clear it from memory on drop
  • Propagate input-read errors with ? instead of process::exit
  • Add reference-compatibility tests for -e, -r, and stdin handling

- Hex-encode `-r` raw output to match reference `argon2` binary
- Read stdin verbatim to preserve trailing and inner newlines
- Verify password with `verify_password()` before "Verification ok"
- Wrap password in `Zeroizing` to clear it from memory on drop
- Propagate input-read errors with `?` instead of `process::exit`
- Add reference-compatibility tests for `-e`, `-r`, and stdin handling
@joelsa joelsa merged commit e569ec4 into main Jul 6, 2026
5 checks passed
@joelsa joelsa deleted the joelsa/reference-compat branch July 6, 2026 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant