mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-12-05 13:58:29 +00:00
Formatting
This commit is contained in:
parent
eadab2e9ca
commit
874f5c34bd
6 changed files with 18 additions and 14 deletions
|
|
@ -2,7 +2,7 @@
|
|||
// PBKDF2 derivation
|
||||
//
|
||||
|
||||
use ring::{digest, pbkdf2, hmac};
|
||||
use ring::{digest, hmac, pbkdf2};
|
||||
|
||||
static DIGEST_ALG: &digest::Algorithm = &digest::SHA256;
|
||||
const OUTPUT_LEN: usize = digest::SHA256_OUTPUT_LEN;
|
||||
|
|
@ -22,7 +22,7 @@ pub fn verify_password_hash(secret: &[u8], salt: &[u8], previous: &[u8], iterati
|
|||
//
|
||||
// HMAC
|
||||
//
|
||||
pub fn hmac_sign(key: &str, data:&str) -> String {
|
||||
pub fn hmac_sign(key: &str, data: &str) -> String {
|
||||
use data_encoding::HEXLOWER;
|
||||
|
||||
let key = hmac::SigningKey::new(&digest::SHA1, key.as_bytes());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue