1
0
Fork 0
mirror of https://github.com/dani-garcia/vaultwarden.git synced 2025-12-05 13:58:29 +00:00

Formatting

This commit is contained in:
Daniel García 2019-04-26 22:08:26 +02:00
commit 874f5c34bd
No known key found for this signature in database
GPG key ID: FC8A7D14C3CD543A
6 changed files with 18 additions and 14 deletions

View file

@ -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());