aboutsummaryrefslogtreecommitdiffstats
path: root/src/identity.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2020-04-06 21:42:35 -0400
committerJesse Luehrs <doy@tozt.net>2020-04-06 21:42:35 -0400
commit8b655f36b868cb023dcdd1ff712de80a59ccbdb1 (patch)
treedce0912bb14147346ee0fa35f1b971f6364a51bc /src/identity.rs
parentca02ec8ca2b24ae7997de80b662cfd3635d75e9e (diff)
downloadrbw-8b655f36b868cb023dcdd1ff712de80a59ccbdb1.tar.gz
rbw-8b655f36b868cb023dcdd1ff712de80a59ccbdb1.zip
clippy
Diffstat (limited to 'src/identity.rs')
-rw-r--r--src/identity.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/identity.rs b/src/identity.rs
index 85b4853..69294ca 100644
--- a/src/identity.rs
+++ b/src/identity.rs
@@ -9,7 +9,7 @@ pub struct Identity {
impl Identity {
pub fn new(email: &str, password: &str, iterations: u32) -> Result<Self> {
- let mut key = vec![0u8; 32];
+ let mut key = vec![0_u8; 32];
pbkdf2::pbkdf2::<hmac::Hmac<sha2::Sha256>>(
password.as_bytes(),
email.as_bytes(),
@@ -17,7 +17,7 @@ impl Identity {
&mut key,
);
- let mut hash = vec![0u8; 32];
+ let mut hash = vec![0_u8; 32];
pbkdf2::pbkdf2::<hmac::Hmac<sha2::Sha256>>(
&key,
password.as_bytes(),
@@ -30,7 +30,7 @@ impl Identity {
hkdf.expand(b"enc", &mut key)
.map_err(|_| Error::HkdfExpand)?;
- let mut mac_key = vec![0u8; 32];
+ let mut mac_key = vec![0_u8; 32];
hkdf.expand(b"mac", &mut mac_key)
.map_err(|_| Error::HkdfExpand)?;