diff options
Diffstat (limited to 'embassy-stm32/src/cryp/mod.rs')
| -rw-r--r-- | embassy-stm32/src/cryp/mod.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/embassy-stm32/src/cryp/mod.rs b/embassy-stm32/src/cryp/mod.rs index 0173b2b5d..4f1115fb7 100644 --- a/embassy-stm32/src/cryp/mod.rs +++ b/embassy-stm32/src/cryp/mod.rs | |||
| @@ -1236,7 +1236,10 @@ impl<'d, T: Instance, M: Mode> Cryp<'d, T, M> { | |||
| 1236 | } | 1236 | } |
| 1237 | if C::REQUIRES_PADDING { | 1237 | if C::REQUIRES_PADDING { |
| 1238 | if last_block_remainder != 0 { | 1238 | if last_block_remainder != 0 { |
| 1239 | panic!("Input must be a multiple of {} bytes in ECB and CBC modes. Consider padding or ciphertext stealing.", C::BLOCK_SIZE); | 1239 | panic!( |
| 1240 | "Input must be a multiple of {} bytes in ECB and CBC modes. Consider padding or ciphertext stealing.", | ||
| 1241 | C::BLOCK_SIZE | ||
| 1242 | ); | ||
| 1240 | } | 1243 | } |
| 1241 | } | 1244 | } |
| 1242 | if last_block { | 1245 | if last_block { |
| @@ -1703,7 +1706,10 @@ impl<'d, T: Instance> Cryp<'d, T, Async> { | |||
| 1703 | } | 1706 | } |
| 1704 | if C::REQUIRES_PADDING { | 1707 | if C::REQUIRES_PADDING { |
| 1705 | if last_block_remainder != 0 { | 1708 | if last_block_remainder != 0 { |
| 1706 | panic!("Input must be a multiple of {} bytes in ECB and CBC modes. Consider padding or ciphertext stealing.", C::BLOCK_SIZE); | 1709 | panic!( |
| 1710 | "Input must be a multiple of {} bytes in ECB and CBC modes. Consider padding or ciphertext stealing.", | ||
| 1711 | C::BLOCK_SIZE | ||
| 1712 | ); | ||
| 1707 | } | 1713 | } |
| 1708 | } | 1714 | } |
| 1709 | if last_block { | 1715 | if last_block { |
