Skip to content

Commit

Permalink
cms: Array conversions should not fail.
Browse files Browse the repository at this point in the history
  • Loading branch information
baloo committed Jun 24, 2024
1 parent 7117a1b commit 17069e8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cms/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,8 @@ macro_rules! encrypt_block_mode {
)));
}
(
Key::<$block_mode::$typ<$alg>>::from_slice(key).to_owned(),
Key::<$block_mode::$typ<$alg>>::try_from(key)
.expect("size invariants violation"),
$block_mode::$typ::<$alg>::generate_iv_with_rng($rng)?,
)
}
Expand Down

0 comments on commit 17069e8

Please sign in to comment.