@ -52,3 +52,17 @@ pub fn salt() -> String {
salt
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_hash() {
let password = "butterflies";
let salt = "cucumbers";
let hashed = hash(password, salt).unwrap();
assert_eq!(hashed, "$argon2i$v=19$m=4096,t=3,p=1$Y3VjdW1iZXJz$r5IYZSVjTOQoW9bGSv3GseB6pcOSEK8btQ8ftJX5wmE");