Struct nrf52832_hal::ecb::Ecb [−][src]
pub struct Ecb { /* fields omitted */ }
Expand description
A safe, blocking wrapper around the AES-ECB peripheral.
It’s really just blockwise AES and not an ECB stream cipher. Blocks can be
encrypted by calling crypt_block
.
Implementations
Destroys self
, giving the ECB
peripheral back.
pub fn encrypt_block(
&mut self,
block: [u8; 16],
key: [u8; 16]
) -> Result<[u8; 16], EncryptionError>
pub fn encrypt_block(
&mut self,
block: [u8; 16],
key: [u8; 16]
) -> Result<[u8; 16], EncryptionError>
Blocking encryption.
Encrypts a block
with key
.
Errors
An error will be returned when the AES hardware raises an ERRORECB
event. This can happen when an operation is started that shares the AES
hardware resources with the AES ECB peripheral while an encryption
operation is running.