Start with challenge 18.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
use crate::bytes::Bytes;
|
||||
use crate::bytes_base64::BytesBase64;
|
||||
use crate::cbc;
|
||||
use crate::ctr;
|
||||
use rand::Rng;
|
||||
use std::io::{BufRead, BufReader};
|
||||
|
||||
@@ -95,5 +96,11 @@ pub fn challenge17() {
|
||||
}
|
||||
|
||||
pub fn challenge18() {
|
||||
println!("[xxxx] Challenge 18: ");
|
||||
let key = Bytes::from_utf8("YELLOW SUBMARINE");
|
||||
let cipher = BytesBase64::from_base64(
|
||||
"L77na/nrFsKvynd6HzOoG7GHTLXsTVu9qvY/2syLXzhPweyyMTJULu/6/kXX0KSvoOLSFQ==",
|
||||
)
|
||||
.to_bytes();
|
||||
let cleartext = ctr::decrypt(&key, &cipher).to_utf8();
|
||||
println!("[xxxx] Challenge 18: {cleartext}");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user