feature/verify-alg #8

Merged
sezieru merged 13 commits from feature/verify-alg into main 2025-10-16 01:43:47 +00:00
Owner

Adds a verify feature via -V flag which can be used to verify a specified hash given a key (with -k). If a key is not specified, an error message is provided and exit code is set appropriately. Otherwise, crypt() is used to verify the hash with the provided key and output "OK"/"FAIL" & exit codes as appropriate.

Adds a **verify** feature via **`-V`** flag which can be used to verify a specified hash given a key (with `-k`). If a key is not specified, an error message is provided and exit code is set appropriately. Otherwise, `crypt()` is used to verify the hash with the provided key and output "OK"/"FAIL" & exit codes as appropriate.
sezieru self-assigned this 2025-10-16 01:42:25 +00:00
This is intended to show a naive implementation of hash verification.
This method is intended to be used for instructional purposes only,
and will be replaced by a far more optimal solution, which will also
serve as a valuable educational lesson.
- uses provided hash as 'setting' for call to crypt_r(), allowing salt & tunings to be reused
- simplifies code dramatically, and permits greater opportunity for optimization
- eliminates lots of potential bugs & complexities in manual salt & tunings retrieval
- promotes better design paradigm for teaching & KISS principles
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: fosster/rexcrypt#8
No description provided.