Skip to content

password-hash: impl From<phc::Error> for Error#2124

Merged
tarcieri merged 1 commit intomasterfrom
password-hash/impl-from-phc-error-for-error
Dec 11, 2025
Merged

password-hash: impl From<phc::Error> for Error#2124
tarcieri merged 1 commit intomasterfrom
password-hash/impl-from-phc-error-for-error

Conversation

@tarcieri
Copy link
Member

This is useful within the impls of traits like PasswordHasher where the return type is password_hash::Result<phc::PasswordHash> but various phc::Errors may occur when constructing the PasswordHash from the params, salt, and output

This is useful within the impls of traits like `PasswordHasher` where
the return type is `password_hash::Result<phc::PasswordHash>` but
various `phc::Error`s may occur when constructing the `PasswordHash`
from the params, salt, and output
@tarcieri tarcieri merged commit 94ae5be into master Dec 11, 2025
11 checks passed
@tarcieri tarcieri deleted the password-hash/impl-from-phc-error-for-error branch December 11, 2025 21:15
@tarcieri tarcieri mentioned this pull request Mar 9, 2026
tarcieri added a commit that referenced this pull request Mar 10, 2026
## Added
- Generic `H` param to traits to support multiple string formats e.g.
  PHC, MCF (#2110)
- Implement `From<phc::Error>` for `Error` (#2124)
- `rand_core` feature (#2126)
- Salt generating helper functions `(try_)generate_salt` (#2128)
- `Error::RngFailure` variant (#2337)

## Changed
- Edition changed to 2024 and MSRV bumped to 1.85 (#1759)
- Extract `CustomizedPasswordHasher` trait (#2105)
- Bump `getrandom` to v0.4 (#2258)

## Removed
- `Encoding` enum (#2102)
- PHC types moved to the `phc` crate, which is re-exported as
  `password_hash::phc` when the `phc` crate feature is enabled
  (#2103, #2116):
  - `Ident`
  - `Output`
  - `ParamsString`
  - `PasswordHash`
  - `PasswordHashString`
  - `Salt`
  - `SaltString`
  - `Value`
- `McfHasher` trait (#2334)
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