MCPcopy Create free account
hub / github.com/Rust-Web-Development/code / hash_password

Function hash_password

ch_10/src/routes/authentication.rs:65–71  ·  view source on GitHub ↗
(password: &[u8])

Source from the content-addressed store, hash-verified

63}
64
65fn hash_password(password: &[u8]) -> String {
66 let salt = SaltString::generate(&mut OsRng);
67 Argon2::default()
68 .hash_password(password, &salt)
69 .expect("Failed to hash password")
70 .to_string()
71}
72
73fn verify_password(
74 hash: &str,

Callers 1

registerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected