#![feature(array_chunks)] use cryptopals::{prelude::*, bvec64, friendly::{aes128, ecb_decrypt, ecb_encrypt}}; fn main() { let key = *b"YELLOW SUBMARINE"; let input = bvec64!("input.txt"); let output = ecb_decrypt(&input, |block| aes128::decrypt(key, block)); dbg!(output.to_text().unwrap()); assert_eq!(input, ecb_encrypt(&output, |block| aes128::encrypt(key, block))); println!("pass") }