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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user