(password: &[u8])
| 63 | } |
| 64 | |
| 65 | fn hash_password(password: &[u8]) -> String { |
| 66 | let salt = SaltString::generate(&mut OsRng); |
| 67 | Argon2::default() |
| 68 | .hash_password(password, &salt) |
| 69 | .expect("Failed to hash password") |
| 70 | .to_string() |
| 71 | } |
| 72 | |
| 73 | fn verify_password( |
| 74 | hash: &str, |