mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-09 08:27:32 -04:00
crypto: Turn an unwrap into a except.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user