rebuild file structur + simple sqlite db endpoint
This commit is contained in:
10
src/utils/hash.rs
Normal file
10
src/utils/hash.rs
Normal file
@@ -0,0 +1,10 @@
|
||||
use bcryp::{hash, verify, DEFAULT_COST};
|
||||
|
||||
pub fn bcrypt_hash(password: &str) -> Result<String, BcryptError> {
|
||||
hash(password, 5)
|
||||
}
|
||||
|
||||
pub fn bcrypt_verify(password: &str, hashed_password: &str) -> Result<String, BcryptError> {
|
||||
verify(password, hashed_password)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user