aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Warner <warner@lothar.com>2017-09-04 12:32:43 -0700
committerBrian Warner <warner@lothar.com>2017-09-04 12:32:43 -0700
commita0f653c95ab7799734ba8525120e130b052dca87 (patch)
tree85ae2d38b1b1a39602d84967e0806a7704d94609 /src
parent9f02b99877ca14588aacb5f1e1f74ad50fe602dc (diff)
downloadPAKEs-a0f653c95ab7799734ba8525120e130b052dca87.tar.xz
fix several clippy lints
Diffstat (limited to 'src')
-rw-r--r--src/spake2.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/spake2.rs b/src/spake2.rs
index d77ea68..0c6b4c4 100644
--- a/src/spake2.rs
+++ b/src/spake2.rs
@@ -168,15 +168,15 @@ fn ed25519_hash_ab(password_vec: &[u8], id_a: &[u8], id_b: &[u8],
let mut transcript = [0u8; 6*32];
let mut pw_hash = Sha256::new();
- pw_hash.input(&password_vec);
+ pw_hash.input(password_vec);
pw_hash.result(&mut transcript[0..32]);
let mut ida_hash = Sha256::new();
- ida_hash.input(&id_a);
+ ida_hash.input(id_a);
ida_hash.result(&mut transcript[32..64]);
let mut idb_hash = Sha256::new();
- idb_hash.input(&id_b);
+ idb_hash.input(id_b);
idb_hash.result(&mut transcript[64..96]);
transcript[96..128].copy_from_slice(first_msg);
@@ -213,19 +213,19 @@ fn ed25519_hash_symmetric(password_vec: &[u8], id_s: &[u8],
let mut transcript = [0u8; 5*32];
let mut pw_hash = Sha256::new();
- pw_hash.input(&password_vec);
+ pw_hash.input(password_vec);
pw_hash.result(&mut transcript[0..32]);
let mut ids_hash = Sha256::new();
- ids_hash.input(&id_s);
+ ids_hash.input(id_s);
ids_hash.result(&mut transcript[32..64]);
if msg_u < msg_v {
- transcript[64..96].copy_from_slice(&msg_u);
+ transcript[64..96].copy_from_slice(msg_u);
transcript[96..128].copy_from_slice(msg_v);
} else {
transcript[64..96].copy_from_slice(msg_v);
- transcript[96..128].copy_from_slice(&msg_u);
+ transcript[96..128].copy_from_slice(msg_u);
}
transcript[128..160].copy_from_slice(key_bytes);