pub fn decrypt_random_chosen_msg(b: &[u8], k: &[u8], iv: &[u8]) -> Result<bool, crate::Error> {
    let plaintext = crate::aes_cbc::decrypt_aes_128_cbc(b, k, iv).unwrap();
    let k = String::from_utf8_lossy(&plaintext.clone());
    let _ = k;
    if let Err(_) = crate::padding::pkcs7validate(&plaintext) {
        Ok(false)
    } else {
        Ok(true)
    }
}
/// decrypt_random_chosen_msg is a helper function for problem 1 from set 3.
///
/// Solution for problem 1 from set 3: <https://cryptopals.com/sets/3/challenges/17>
decrypt_random_chosen_msg is a helper function for problem 1 from set 3.
Solution for problem 1 from set 3.
decrypt_random_chosen_msg is a helper function for problem 1 from set 3 . Solution for problem 1 from set 3 .
pub fn decrypt_random_chosen_msg(b: &[u8], k: &[u8], iv: &[u8]) -> Result<bool, crate::Error> {
    let plaintext = crate::aes_cbc::decrypt_aes_128_cbc(b, k, iv).unwrap();
    let k = String::from_utf8_lossy(&plaintext.clone());
    let _ = k;
    if let Err(_) = crate::padding::pkcs7validate(&plaintext) {
        Ok(false)
    } else {
        Ok(true)
    }
}
pub fn decrypt_random_chosen_msg ( b : & [ u8 ] , k : & [ u8 ] , iv : & [ u8 ] ) -> Result < bool , crate :: Error > { let plaintext = crate :: aes_cbc :: decrypt_aes_128_cbc ( b , k , iv ) . unwrap ( ) ; let k = String :: from_utf8_lossy ( & plaintext . clone ( ) ) ; let _ = k ; if let Err ( _ ) = crate :: padding :: pkcs7validate ( & plaintext ) { Ok ( false ) } else { Ok ( true ) } }
decrypt_random_chosen_msg is a helper function for problem 1 from set 3.
decrypt_random_chosen_msg is a helper function for problem 1 from set 3 .
b
&[u8]
k
&[u8]
iv
&[u8]