From 01e62e9baaf5860f0b9dee39e985a89333c0a854 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sat, 13 Apr 2019 04:30:50 -0400 Subject: adjust the signature of create_query_string a bit --- tests/set2.rs | 8 ++++---- tests/set4.rs | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'tests') diff --git a/tests/set2.rs b/tests/set2.rs index 04614de..a77cf7a 100644 --- a/tests/set2.rs +++ b/tests/set2.rs @@ -99,10 +99,10 @@ fn problem_12() { fn problem_13() { fn profile_for(email: &str) -> String { let mut params = HashMap::new(); - params.insert("email", email); - params.insert("uid", "10"); - params.insert("role", "user"); - return matasano::create_query_string(params); + params.insert("email", email.to_string()); + params.insert("uid", "10".to_string()); + params.insert("role", "user".to_string()); + return matasano::create_query_string(¶ms); } let key = util::random_aes_128_key(); diff --git a/tests/set4.rs b/tests/set4.rs index 5095b6a..89581e2 100644 --- a/tests/set4.rs +++ b/tests/set4.rs @@ -215,12 +215,12 @@ fn problem_31() { let file = "filename.txt"; let got = matasano::crack_hmac_timing(file, |guess| { let mut params = std::collections::HashMap::new(); - params.insert("file", file); - params.insert("signature", guess); + params.insert("file", file.to_string()); + params.insert("signature", guess.to_string()); let res = reqwest::get(&format!( "{}{}", "http://localhost:9000/?", - matasano::create_query_string(params) + matasano::create_query_string(¶ms) )) .unwrap(); let status = res.status(); -- cgit v1.2.3-54-g00ecf