This commit is contained in:
Heiko Schaefer 2021-08-12 15:22:04 +02:00
parent df4b4bdabb
commit f1add02672

View file

@ -51,10 +51,13 @@ fn main() -> Result<()> {
// decrypt
print!(" Decrypt");
let msg = std::fs::read_to_string(ciphertext).expect(&format![
"Unable to read ciphertext from file {}",
ciphertext
]);
let msg =
std::fs::read_to_string(ciphertext).unwrap_or_else(|_| {
panic!(
"Unable to read ciphertext from file {}",
ciphertext
)
});
let dec_out = run_test(&mut card, test_decrypt, &[&key, &msg])?;
println!(" {:x?}", dec_out);