Passwors is a simple password handling library
that utilises Rust's type system to enfore better
password handling. Use it as a basic building
block for more complex authentication systems.
let pw = ClearTextPassword::from_string(some_password_source).unwrap();
let salt = HashSalt::new().unwrap(); // You should grab this from your database.
let a2hash = Argon2PasswordHasher::default();
let pw_hash = pw.hash(&a2hash, &salt);
assert_eq!(pw_hash, stored_hash, "Login failed!");