Skip to content

Commit 35e0e9a

Browse files
authored
password-hash: remove McfHasher trait (#2334)
The crate is now generic around password hash string formats, so having an MCF-specific trait like this doesn't make sense. The functionality for upgrading MCF hashes to PHC hashes using algorithm-specific rules is worth retaining, but we can probably move this trait or add a similarly shaped one to e.g. the `mcf` crate which is better equipped to deal with MCF-specific concerns.
1 parent 604171b commit 35e0e9a

1 file changed

Lines changed: 0 additions & 20 deletions

File tree

password-hash/src/lib.rs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -224,26 +224,6 @@ where
224224
}
225225
}
226226

227-
/// Trait for password hashing algorithms which support the legacy
228-
/// [Modular Crypt Format (MCF)][MCF].
229-
///
230-
/// [MCF]: https://passlib.readthedocs.io/en/stable/modular_crypt_format.html
231-
#[cfg(feature = "phc")]
232-
pub trait McfHasher {
233-
/// Upgrade an MCF hash to a PHC hash. MCF follow this rough format:
234-
///
235-
/// ```text
236-
/// $<id>$<content>
237-
/// ```
238-
///
239-
/// MCF hashes are otherwise largely unstructured and parsed according to
240-
/// algorithm-specific rules so hashers must parse a raw string themselves.
241-
///
242-
/// # Errors
243-
/// Returns errors if the the hash couldn't be converted
244-
fn upgrade_mcf_hash(&self, hash: &str) -> Result<phc::PasswordHash>;
245-
}
246-
247227
/// Generate a random salt value of the recommended length using the system's secure RNG.
248228
///
249229
/// # Panics

0 commit comments

Comments
 (0)