Skip to main content

hash_password

Function hash_password 

Source
pub async fn hash_password(password: &str) -> Result<String, Error>
Expand description

Hashes a password with Argon2id into a PHC string for storage; never stores the plaintext. Runs on Tokio’s blocking pool, as verify_password does, one hash per core at once.

§Errors

Argon2 refuses the password.