Bump argon2 #12

Merged
phoenix merged 10 commits from bump-argon2 into main 2026-11-01 19:18:31 -05:00
Showing only changes of commit bc6b36defd - Show all commits
+5 -3
View File
@@ -12,7 +12,7 @@ use rand::distr::SampleString;
pub struct SaltString {
pub raw: String,
pub in_bytes: Vec<u8>
pub in_bytes: Vec<u8>,
}
impl SaltString {
@@ -21,7 +21,7 @@ impl SaltString {
let s = rand::distr::Alphanumeric.sample_string(&mut rng, 20);
let salt_string = SaltString {
raw: (&s).to_string(),
in_bytes: s.into_bytes()
in_bytes: s.into_bytes(),
};
Ok(salt_string)
@@ -70,7 +70,9 @@ pub fn hash_password(
// parameters, salt, and the hash itself.
// Ok(argon2.hash_password(password_bytes, salt)?.to_string())
// Ok(argon2.hash_password(password_bytes)?.to_string())
Ok(argon2.hash_password_with_salt(password_bytes, &salt.in_bytes)?.to_string())
Ok(argon2
.hash_password_with_salt(password_bytes, &salt.in_bytes)?
.to_string())
}
pub fn verify_password(