Skip to content

password-hash: remove Encoding enum#2102

Merged
tarcieri merged 1 commit intomasterfrom
password-hash/remove-encoding-type
Dec 2, 2025
Merged

password-hash: remove Encoding enum#2102
tarcieri merged 1 commit intomasterfrom
password-hash/remove-encoding-type

Conversation

@tarcieri
Copy link
Member

@tarcieri tarcieri commented Dec 2, 2025

The encoding types in this crate are designed around the PHC String Format which uses "B64", a.k.a. unpadded non-URL-safe Base64.

The Encoding type was designed to make it possible to use alternative encodings from Modular Crypt Format (MCF), but that doesn't actually make sense because PHC Strings mandate "B64".

The Encoding type has since been extracted into the mcf crate as mcf::Base64: RustCrypto/formats#1918

The encoding types in this crate are designed around the PHC String
Format which uses "B64", a.k.a. unpadded non-URL-safe Base64.

The `Encoding` type was designed to make it possible to use alternative
encodings from Modular Crypt Format (MCF), but that doesn't actually
make sense because PHC Strings mandate "B64".

The `Encoding` type has since been extracted into the `mcf` crate
as `mcf::Base64`: RustCrypto/formats#1918
@tarcieri tarcieri merged commit 5f07487 into master Dec 2, 2025
11 checks passed
@tarcieri tarcieri deleted the password-hash/remove-encoding-type branch December 2, 2025 14:34
@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