Skip to main content

password

Function password 

Source
pub fn password(password: &str, cost: Cost) -> Result<PhcString>
Expand description

Hashes a plaintext password with Argon2id at the given cost.

A fresh random salt is generated for every call. The result is a PHC-formatted string containing the salt and parameters needed for verification.