Skip to content

sha-crypt: impl the password-hash crate traits#771

Merged
tarcieri merged 1 commit intomasterfrom
sha-crypt/impl-password-hash-traits
Dec 12, 2025
Merged

sha-crypt: impl the password-hash crate traits#771
tarcieri merged 1 commit intomasterfrom
sha-crypt/impl-password-hash-traits

Conversation

@tarcieri
Copy link
Copy Markdown
Member

Rewrites the simple feature to use the (Customized)PasswordHasher and PasswordVerifier traits, currently impl'd for a ZST.

The implementations are currently duplicated between SHA-256 and SHA-512, but this PR leaves addressing that duplication for a followup and just gets everything working to begin with.

The majority of the original test vectors are preserved.

The CheckError and DecodeError types have been replaced with password_hash::Error and mcf::Error respectively.

Rewrites the `simple` feature to use the `(Customized)PasswordHasher`
and `PasswordVerifier` traits, currently impl'd for a ZST.

The implementations are currently duplicated between SHA-256 and
SHA-512, but this PR leaves addressing that duplication for a followup
and just gets everything working to begin with.

The majority of the original test vectors are preserved.

The `CheckError` and `DecodeError` types have been replaced with
`password_hash::Error` and `mcf::Error` respectively.
@tarcieri tarcieri force-pushed the sha-crypt/impl-password-hash-traits branch from 2aa8aa6 to e63ace4 Compare December 12, 2025 17:36
@tarcieri tarcieri merged commit c5f8a75 into master Dec 12, 2025
64 checks passed
@tarcieri tarcieri deleted the sha-crypt/impl-password-hash-traits branch December 12, 2025 17:38
@tarcieri tarcieri mentioned this pull request Apr 21, 2026
tarcieri added a commit that referenced this pull request Apr 21, 2026
## Added
- Implement `core::error::Error` for error types (#719)
- Implement the `password-hash` crate traits (#771, #779, #806)
- Dynamic `Algorithm` support (#800)
- `Params` customization for `ShaCrypt` type (#801)
- `ShaCrypt::SHA256` and `ShaCrypt::SHA512` (#813)
- `no_alloc` support (#894)

## Changed
- `rounds` parameter is now `u32` (#500)
- Make hashing infallible (#500)
- Bump edition to 2024; MSRV 1.85 (#563)
- Switch from `rand` to `rand_core` (#720)
- Use `mcf` crate for implementing Modular Crypt Format (#726, #842)
- Unify `Params` type (#772)
- Rename `simple` feature to `password-hash` (#776)
- Migrate from `subtle` to `ctutils` (#845)
- Bump `password-hash` dependency to v0.6 (#848)
- Bump `sha2` to v0.11 (#872)

## Removed
- `std` feature (#719)
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