crypto: Turn an unwrap into a except.

This commit is contained in:
Damir Jelić 2020-09-15 17:18:31 +02:00
parent e98960f30b
commit 890e6cbc73

View file

@ -133,7 +133,7 @@ impl<'a, R: Read + 'a> AttachmentEncryptor<'a, R> {
};
let encoded_iv = encode(iv);
let aes = Aes256Ctr::new_var(&key, &iv).unwrap();
let aes = Aes256Ctr::new_var(&key, &iv).expect("Cannot create AES encryption object.");
AttachmentEncryptor {
finished: false,