WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 2e43d01

Browse files
committed
password-hash: remove McfHasher::verify_mcf_hash
The new way to verify an MCF hash is to use `PasswordVerifier` with `mcf::PasswordHash` as the generic parameter. The `McfHasher` trait is still useful for providing a way to upgrade MCF hashes to PHC, though (however arguably it should have a different name)
1 parent e49627e commit 2e43d01

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

password-hash/src/lib.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,4 @@ pub trait McfHasher {
152152
/// MCF hashes are otherwise largely unstructured and parsed according to
153153
/// algorithm-specific rules so hashers must parse a raw string themselves.
154154
fn upgrade_mcf_hash(&self, hash: &str) -> Result<phc::PasswordHash>;
155-
156-
/// Verify a password hash in MCF format against the provided password.
157-
fn verify_mcf_hash(&self, password: &[u8], mcf_hash: &str) -> Result<()>
158-
where
159-
Self: PasswordVerifier<phc::PasswordHash>,
160-
{
161-
self.verify_password(password, &self.upgrade_mcf_hash(mcf_hash)?)
162-
}
163155
}

0 commit comments

Comments
 (0)