Development Documentation (main branch) - For stable release docs, see docs.rs/eidetica

hash_password

Function hash_password 

Source
pub fn hash_password(password: impl AsRef<str>) -> Result<(String, String)>
Expand description

Hash a password using Argon2id

§Arguments

  • password - The password to hash

§Returns

A tuple of (password_hash, salt_string) where:

  • password_hash is the Argon2 hash string (PHC format)
  • salt_string is the random salt used (base64 encoded string)