optimize sha256 interface gather/vector inputs
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
14e3b242df
commit
887ae84f1e
7 changed files with 85 additions and 50 deletions
|
@ -1,13 +1,10 @@
|
|||
mod argon;
|
||||
mod sha256;
|
||||
pub 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<()> {
|
||||
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) }
|
||||
pub fn password(password: &str) -> Result<String> { argon::password(password) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue