Trait password_hash::McfHasher[][src]

pub trait McfHasher {
    fn upgrade_mcf_hash<'a>(
        &self,
        hash: &'a str
    ) -> Result<PasswordHash<'a>, HasherError>; fn verify_mcf_hash(
        &self,
        password: &[u8],
        mcf_hash: &str
    ) -> Result<(), VerifyError>
    where
        Self: PasswordVerifier
, { ... } }

Trait for password hashing algorithms which support the legacy Modular Crypt Format (MCF).

Required methods

fn upgrade_mcf_hash<'a>(
    &self,
    hash: &'a str
) -> Result<PasswordHash<'a>, HasherError>
[src]

Upgrade an MCF hash to a PHC hash. MCF follow this rough format:

$<id>$<content>

MCF hashes are otherwise largely unstructured and parsed according to algorithm-specific rules so hashers must parse a raw string themselves.

Loading content...

Provided methods

fn verify_mcf_hash(
    &self,
    password: &[u8],
    mcf_hash: &str
) -> Result<(), VerifyError> where
    Self: PasswordVerifier
[src]

Verify a password hash in MCF format against the provided password.

Loading content...

Implementors

Loading content...