diff options
Diffstat (limited to 'src/bin/timing_attack.rs')
-rw-r--r-- | src/bin/timing_attack.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/bin/timing_attack.rs b/src/bin/timing_attack.rs index ac9c895..b9f9b7f 100644 --- a/src/bin/timing_attack.rs +++ b/src/bin/timing_attack.rs @@ -8,7 +8,7 @@ struct Info { } fn gen_key() -> Vec<u8> { - let mut key = [0u8; 80]; + let mut key = [0u8; 16]; rand::thread_rng().fill_bytes(&mut key); key.to_vec() } @@ -33,7 +33,6 @@ fn index( key: &[u8], ) -> actix_web::Result<String> { let hmac = matasano::sha1_hmac(&info.file.clone().into_bytes(), key); - println!("hmac for {} is {}", info.file, hex::encode(hmac)); if insecure_compare( &hex::decode(info.signature.clone()).unwrap(), &hmac[..], |