Login endpoint (#20)

Reviewed-on: #20
Co-authored-by: phoenix <kundeng00@pm.me>
Co-committed-by: phoenix <kundeng00@pm.me>
This commit is contained in:
phoenix
2025-04-07 01:22:57 +00:00
committed by phoenix
parent 332e9d3378
commit 3424d31151
10 changed files with 402 additions and 35 deletions
+4
View File
@@ -15,6 +15,10 @@ pub fn generate_salt() -> Result<SaltString, argon2::Error> {
Ok(salt)
}
pub fn get_salt(s: &str) -> Result<SaltString, argon2::password_hash::Error> {
SaltString::from_b64(s)
}
pub fn hash_password(
password: &String,
salt: &SaltString,