Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
argon2: avoid salt-length related panic (closes #134)
Adds some additional advance checks that Argon2 parameters are within range, and returns errors in the event they are not. This prevents a panic caused by what was previously an `unimplemented!` call when converting error types. The occurrence of the panic in the first place speaks to overall deficienciesin the `password-hash` crate's error handling strategy. It's further complicated by the awkwardness of the `password_hash::Output::init_with` API. The code in this commit has TODOs for addressing the above, but it'd be good to open issues upstream on the `password-hash` crate about these problems, and ideally update the TODOs in the code with references to the issues.
- Loading branch information