summaryrefslogtreecommitdiff
path: root/src/auth
diff options
context:
space:
mode:
Diffstat (limited to 'src/auth')
-rw-r--r--src/auth/mod.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/auth/mod.rs b/src/auth/mod.rs
index 7f995f8..2f4c313 100644
--- a/src/auth/mod.rs
+++ b/src/auth/mod.rs
@@ -11,11 +11,10 @@ pub struct HashedPassword {
// TODO: Configurable number of iterations.
pub fn encode(salt: &str, pw: &str) -> HashedPassword {
let mut enc = vec!(0; 32);
- let encrypted = bcrypt_pbkdf(pw.as_bytes(), salt.as_bytes(),
- 10, &mut enc);
+ let encrypted = bcrypt_pbkdf(pw.as_bytes(), salt.as_bytes(), 10, &mut enc);
HashedPassword {
salt: salt.to_string(),
- enc: base64::encode(&enc)
+ enc: base64::encode(&enc),
}
}