password-hash: change bounds for PHC verify blanket impl [BREAKING]#2370
Merged
password-hash: change bounds for PHC verify blanket impl [BREAKING]#2370
Conversation
Changes the `TryFrom` bound for constructing `T::Params` to accept a full `phc::PasswordHash` as the input type, rather than just its `phc::ParamsString`. This is actually how it used to work in prior releases, but regressed: https://docs.rs/password-hash/0.5.0/src/password_hash/traits.rs.html#63 This is needed so the params can include the output size for the hash. This is unfortunately a breaking change, but fortunately we haven't yet released any password hash crates, so it will only impact prerelease users.
14f1c89 to
67781ec
Compare
Member
Author
|
I'll open a corresponding PR to https://github.com/RustCrypto/password-hashes first before merging |
Member
Author
|
Hah, so as it were all of our crates have the impls needed to make this work since they had them from before. It's technically non-breaking from the perspective of our crates. I'm going to go ahead and merge this and do a release (after verifying it actually resolves #2352 with a test). But we should probably yank v0.6.0 since it is technically a breaking change. |
tarcieri
added a commit
to RustCrypto/password-hashes
that referenced
this pull request
Apr 7, 2026
This adds a test that non-default output lengths are correctly supported which was implemented in RustCrypto/traits#2370
tarcieri
added a commit
to RustCrypto/password-hashes
that referenced
this pull request
Apr 7, 2026
This adds a test that non-default output lengths are correctly supported which was implemented in RustCrypto/traits#2370
Merged
tarcieri
added a commit
that referenced
this pull request
Apr 8, 2026
## Changed - [BREAKING] `PasswordVerifier` blanket impl bounds for `phc::PasswordHash` (#2370)
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.
Changes the
TryFrombound for constructingT::Paramsto accept a fullphc::PasswordHashas the input type, rather than just itsphc::ParamsString.This is actually how it used to work in prior releases, but regressed:
https://docs.rs/password-hash/0.5.0/src/password_hash/traits.rs.html#63
This is needed so the params can include the output size for the hash.
This is unfortunately a breaking change, but fortunately we haven't yet released any password hash crates, so it will only impact prerelease users.
Closes #2352.