MCPcopy Create free account
hub / github.com/actix/examples / verify

Function verify

auth/simple-auth-server/src/utils.rs:22–29  ·  view source on GitHub ↗
(hash: &str, password: &str)

Source from the content-addressed store, hash-verified

20}
21
22pub fn verify(hash: &str, password: &str) -> Result<bool, ServiceError> {
23 argon2::verify_encoded_ext(hash, password.as_bytes(), SECRET_KEY.as_bytes(), &[]).map_err(
24 |err| {
25 dbg!(err);
26 ServiceError::Unauthorized
27 },
28 )
29}
30
31#[cfg(test)]
32mod tests {

Callers 1

queryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected