Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

password-hash: add Base64ShaCrypt #1352

Merged
merged 3 commits into from
Jan 8, 2024
Merged

Conversation

SteelAlloy
Copy link
Contributor

base64ct recent versions introduces Base64ShaCrypt, a Crypt variant for sha1_crypt, sha256_crypt, sha512_crypt, and md5_crypt.

I added this variant in the Encoding of password-hash.

pub enum Encoding {
    B64,
    Bcrypt,
    Crypt,
    ShaCrypt,
}

This change is necessary to support these algorithms. (incoming PR for these once this is merged)

I only updated password-hash's Cargo.toml file and not the global Cargo.lock since there were a lot of dependencies on it. I didn't want this PR to be gigantic.

@tarcieri
Copy link
Member

tarcieri commented Oct 3, 2023

This is unfortunately a breaking change as Encoding is not marked #[non_exhaustive].

We can add it in the next breaking release of password-hash (and perhaps also mark it as #[non_exhaustive] to permit future additions in a non-breaking manner)

@SteelAlloy
Copy link
Contributor Author

I agree with the addition of #[non_exhaustive] 👍

tarcieri added a commit that referenced this pull request Jan 8, 2024
This is not-for-release, but to signal that we are about to begin making
breaking changes.

Notably it would be nice to finally land #1352, which adds `ShaCrypt`
support and makes the `Encoding` enum `non_exhaustive` so we could
potentially add additional encodings in the future without it being a
breaking change.
tarcieri added a commit that referenced this pull request Jan 8, 2024
This is not-for-release, but to signal that we are about to begin making
breaking changes.

Notably it would be nice to finally land #1352, which adds `ShaCrypt`
support and makes the `Encoding` enum `non_exhaustive` so we could
potentially add additional encodings in the future without it being a
breaking change.
@tarcieri tarcieri changed the title Add Base64ShaCrypt password-hash: add Base64ShaCrypt Jan 8, 2024
@tarcieri tarcieri merged commit fd48936 into RustCrypto:master Jan 8, 2024
9 checks passed
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.

2 participants