summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/sha1.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sha1.rs b/src/sha1.rs
index bcd9295..f381352 100644
--- a/src/sha1.rs
+++ b/src/sha1.rs
@@ -92,8 +92,8 @@ pub fn sha1_with_state (bytes: &[u8], mut h: [u32; 5]) -> [u8; 20] {
pub fn sha1_mac (bytes: &[u8], key: &[u8]) -> [u8; 20] {
let full_bytes: Vec<u8> = key
.iter()
+ .chain(bytes.iter())
.map(|x| *x)
- .chain(bytes.iter().map(|x| *x))
.collect();
return sha1(&full_bytes[..]);
}