Add users authentication routes
This commit is contained in:
6
matrixgw_backend/src/utils/crypt_utils.rs
Normal file
6
matrixgw_backend/src/utils/crypt_utils.rs
Normal file
@@ -0,0 +1,6 @@
|
||||
use sha2::{Digest, Sha256};
|
||||
|
||||
/// Compute SHA256sum of a given string
|
||||
pub fn sha256str(input: &str) -> String {
|
||||
hex::encode(Sha256::digest(input.as_bytes()))
|
||||
}
|
||||
Reference in New Issue
Block a user