mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-06-27 18:14:51 +02:00
13 lines
337 B
Rust
13 lines
337 B
Rust
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) }
|