diff options
| author | KunoiSayami <[email protected]> | 2026-09-03 16:55:32 +0800 |
|---|---|---|
| committer | KunoiSayami <[email protected]> | 2026-09-03 16:55:32 +0800 |
| commit | e9c479e78779745a942c63dda5add4a055647cbe (patch) | |
| tree | d7325dc969a82ec5d85c485b5bb91d3e04c3f2ab /src/test.rs | |
| parent | 9e67f120b797bae10bd226bbb4632f8d19a24361 (diff) | |
- argon2 0.6 generates the salt internally, so drop the explicit
password-hash dependency along with SaltString/OsRng usage
- hash_password now takes only the password; update callers in
datastructures.rs and the test module accordingly
- switch PasswordHash import to argon2::password_hash::phc
- bump base64 0.22->0.23, itertools 0.14->0.15, regenerate Cargo.lock
- bump crate version to 4.4.1
Co-Authored-By: Claude Sonnet 5 <[email protected]>
Signed-off-by: KunoiSayami <[email protected]>
Diffstat (limited to 'src/test.rs')
| -rw-r--r-- | src/test.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/test.rs b/src/test.rs index e71aee4..f9c6981 100644 --- a/src/test.rs +++ b/src/test.rs @@ -26,7 +26,7 @@ mod core { }; use argon2::{ Argon2, - password_hash::{PasswordHash, PasswordHasher, PasswordVerifier, SaltString}, + password_hash::{PasswordHasher, PasswordVerifier, phc::PasswordHash}, }; use redis::AsyncCommands; use std::io::{Read, Write}; @@ -37,13 +37,11 @@ mod core { #[test] fn test_argon2() { - use argon2::password_hash::rand_core::OsRng; let passwd = b"hunter2"; - let salt = SaltString::generate(&mut OsRng); let argon2 = Argon2::default(); - argon2.hash_password(passwd, &salt).unwrap(); + argon2.hash_password(passwd).unwrap(); } #[test] |
