diff options
Diffstat (limited to 'tests/stm32/src/bin')
| -rw-r--r-- | tests/stm32/src/bin/cryp.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/stm32/src/bin/cryp.rs b/tests/stm32/src/bin/cryp.rs index 6bca55f55..cc317f625 100644 --- a/tests/stm32/src/bin/cryp.rs +++ b/tests/stm32/src/bin/cryp.rs | |||
| @@ -13,7 +13,7 @@ use embassy_executor::Spawner; | |||
| 13 | use embassy_stm32::{ | 13 | use embassy_stm32::{ |
| 14 | bind_interrupts, | 14 | bind_interrupts, |
| 15 | cryp::{self, *}, | 15 | cryp::{self, *}, |
| 16 | peripherals | 16 | peripherals, |
| 17 | }; | 17 | }; |
| 18 | use {defmt_rtt as _, panic_probe as _}; | 18 | use {defmt_rtt as _, panic_probe as _}; |
| 19 | 19 | ||
| @@ -52,7 +52,9 @@ async fn main(_spawner: Spawner) { | |||
| 52 | let mut gcm_decrypt = hw_cryp.start(&aes_gcm, Direction::Decrypt).await; | 52 | let mut gcm_decrypt = hw_cryp.start(&aes_gcm, Direction::Decrypt).await; |
| 53 | hw_cryp.aad(&mut gcm_decrypt, AAD1, false).await; | 53 | hw_cryp.aad(&mut gcm_decrypt, AAD1, false).await; |
| 54 | hw_cryp.aad(&mut gcm_decrypt, AAD2, true).await; | 54 | hw_cryp.aad(&mut gcm_decrypt, AAD2, true).await; |
| 55 | hw_cryp.payload(&mut gcm_decrypt, &ciphertext, &mut plaintext, true).await; | 55 | hw_cryp |
| 56 | .payload(&mut gcm_decrypt, &ciphertext, &mut plaintext, true) | ||
| 57 | .await; | ||
| 56 | let decrypt_tag = hw_cryp.finish(gcm_decrypt).await; | 58 | let decrypt_tag = hw_cryp.finish(gcm_decrypt).await; |
| 57 | 59 | ||
| 58 | info!("AES-GCM Ciphertext: {:?}", ciphertext); | 60 | info!("AES-GCM Ciphertext: {:?}", ciphertext); |
