Skip to content

mcf: Base64 decoding support#1918

Merged
tarcieri merged 1 commit intomasterfrom
mcf/base64
Jul 7, 2025
Merged

mcf: Base64 decoding support#1918
tarcieri merged 1 commit intomasterfrom
mcf/base64

Conversation

@tarcieri
Copy link
Member

@tarcieri tarcieri commented Jul 7, 2025

Adds a Base64 enum with variants for Bcrypt, Crypt, and ShaCrypt, i.e. the non-standard Base64 variants used in MCF hashes.

This is extracted from password_hash::Encoding which was straddling the line between the PHC format and MCF with such a feature. That type can now be removed in the next breaking release.

Adds a `Base64` enum with variants for `Bcrypt`, `Crypt`, and
`ShaCrypt`, i.e. the non-standard Base64 variants used in MCF hashes.

This is extracted from `password_hash::Encoding` which was straddling
the line between the PHC format and MCF with such a feature. That type
can now be removed in the next breaking release.
@tarcieri tarcieri merged commit 61eaf9e into master Jul 7, 2025
173 checks passed
@tarcieri tarcieri deleted the mcf/base64 branch July 7, 2025 17:19
tarcieri added a commit to RustCrypto/traits that referenced this pull request 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
tarcieri added a commit to RustCrypto/traits that referenced this pull request 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
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