Clean up and lay groundwork for challange 32

This commit is contained in:
2022-08-28 15:53:23 -04:00
parent 75d4b97524
commit f50197e480
6 changed files with 111 additions and 92 deletions

View File

@@ -176,7 +176,7 @@ pub fn challenge12() {
// byte, encrypt it, and then compare it to the result of the encryption
// oracle, but this approach is fine too.
assert_eq!(roundtrip_text.0[..138], cleartext.0);
println!("[okay] Challenge 12: {}", roundtrip_text.to_sub_utf8(17));
println!("[okay] Challenge 12: {}", &roundtrip_text.to_utf8()[..17]);
}
pub fn challenge13() {
@@ -357,7 +357,7 @@ pub fn challenge14() {
let roundtrip_text = decode(&prefix, &key);
let cleartext = utils::read_base64("data/12.txt");
assert_eq!(roundtrip_text, cleartext);
println!("[okay] Challenge 14: {}", roundtrip_text.to_sub_utf8(17));
println!("[okay] Challenge 14: {}", &roundtrip_text.to_utf8()[..17]);
}
pub fn challenge15() {