diff options
author | Daniel García <[email protected]> | 2019-04-26 22:08:26 +0200 |
---|---|---|
committer | Daniel García <[email protected]> | 2019-04-26 22:08:26 +0200 |
commit | 874f5c34bdb2272f3cac1ceef13edea22b6e263d (patch) | |
tree | 6ce35134bb5a1c14bcb506f32a48a87c1f333fea /src/crypto.rs | |
parent | eadab2e9ca15b68532ad6a1e8300a0285947b809 (diff) | |
download | vaultwarden-874f5c34bdb2272f3cac1ceef13edea22b6e263d.tar.gz vaultwarden-874f5c34bdb2272f3cac1ceef13edea22b6e263d.zip |
Formatting
Diffstat (limited to 'src/crypto.rs')
-rw-r--r-- | src/crypto.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/crypto.rs b/src/crypto.rs index e55e461b..968f9eb9 100644 --- a/src/crypto.rs +++ b/src/crypto.rs @@ -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()); |