(password: &[u8])
| 49 | } |
| 50 | |
| 51 | fn hash_password(password: &[u8]) -> String { |
| 52 | let salt = SaltString::generate(&mut OsRng); |
| 53 | Argon2::default() |
| 54 | .hash_password(password, &salt) |
| 55 | .expect("Failed to hash password") |
| 56 | .to_string() |
| 57 | } |
| 58 | |
| 59 | fn verify_password( |
| 60 | hash: &str, |