pub fn verify(hash: &str, password: &str) -> Result<bool, ServiceError> {
    let secret_key = get_service_config_value("user_management", "password-key", true)?;
    let result = Verifier::default()
        .with_hash(hash)
        .with_password(password)
        .with_secret_key(secret_key.as_str())
        .verify();

    match result {
        Ok(b) => Ok(b),
        Err(e) => Err(ServiceError::InternalServerError(format!("Password verify error {:?}", e.to_string()))),
    }
}
/// Verifies a password against a hash
Verifies a password against a hash
Verifies a password against a hash
pub fn verify(hash: &str, password: &str) -> Result<bool, ServiceError> {
    let secret_key = get_service_config_value("user_management", "password-key", true)?;
    let result = Verifier::default()
        .with_hash(hash)
        .with_password(password)
        .with_secret_key(secret_key.as_str())
        .verify();
    match result {
        Ok(b) => Ok(b),
        Err(e) => Err(ServiceError::InternalServerError(format!("Password verify error {:?}", e.to_string()))),
    }
}
pub fn verify ( hash : & str , password : & str ) -> Result < bool , ServiceError > { let secret_key = get_service_config_value ( " " , " " , true ) ? ; let result = Verifier :: default ( ) . with_hash ( hash ) . with_password ( password ) . with_secret_key ( secret_key . as_str ( ) ) . verify ( ) ; match result { Ok ( b ) => Ok ( b ) , Err ( e ) => Err ( ServiceError :: InternalServerError ( format ! ( " " e to_string ( ) ) ) ) , } }
Verifies a password against a hash
Verifies a password against a hash
hash
&str
password
&str