1
0
Fork 0
mirror of https://forgejo.ellis.link/continuwuation/continuwuity.git synced 2025-08-07 15:20:55 +00:00
continuwuity/src/core/utils/hash.rs

14 lines
337 B
Rust
Raw Normal View History

mod argon;
mod sha256;
use crate::Result;
pub fn password(password: &str) -> Result<String> { argon::password(password) }
pub fn verify_password(password: &str, password_hash: &str) -> Result<()> {
argon::verify_password(password, password_hash)
}
#[must_use]
pub fn calculate_hash(keys: &[&[u8]]) -> Vec<u8> { sha256::hash(keys) }