aboutsummaryrefslogtreecommitdiff
path: root/src/crypto.rs
diff options
context:
space:
mode:
authorDaniel García <[email protected]>2019-04-26 22:08:26 +0200
committerDaniel García <[email protected]>2019-04-26 22:08:26 +0200
commit874f5c34bdb2272f3cac1ceef13edea22b6e263d (patch)
tree6ce35134bb5a1c14bcb506f32a48a87c1f333fea /src/crypto.rs
parenteadab2e9ca15b68532ad6a1e8300a0285947b809 (diff)
downloadvaultwarden-874f5c34bdb2272f3cac1ceef13edea22b6e263d.tar.gz
vaultwarden-874f5c34bdb2272f3cac1ceef13edea22b6e263d.zip
Formatting
Diffstat (limited to 'src/crypto.rs')
-rw-r--r--src/crypto.rs4
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());