Driver for the Advanced Encryption Standard (AES) Electronic Code Book (ECB) peripheral.
More...
|
| bool | nrf_ecb_init (void) |
| | Function for initializing and powering on the ECB peripheral. More...
|
| |
| bool | nrf_ecb_crypt (uint8_t *dst, const uint8_t *src) |
| | Function for encrypting 16-byte data using current key. More...
|
| |
| void | nrf_ecb_set_key (const uint8_t *key) |
| | Function for setting the key to be used for encryption. More...
|
| |
Driver for the Advanced Encryption Standard (AES) Electronic Code Book (ECB) peripheral.
To encrypt data, the peripheral must first be powered on using nrf_ecb_init. Next, the key must be set using nrf_ecb_set_key.
| bool nrf_ecb_crypt |
( |
uint8_t * |
dst, |
|
|
const uint8_t * |
src |
|
) |
| |
Function for encrypting 16-byte data using current key.
This function avoids unnecessary copying of data if the parameters point to the correct locations in the ECB data structure.
- Parameters
-
| dst | Result of encryption, 16 bytes will be written. |
| src | Source with 16-byte data to be encrypted. |
- Return values
-
| true | The encryption operation completed. |
| false | The encryption operation did not complete. |
| bool nrf_ecb_init |
( |
void |
| ) |
|
Function for initializing and powering on the ECB peripheral.
This function allocates memory for the ECBDATAPTR.
- Return values
-
| true | The initialization was successful. |
| false | The power-on failed. |
| void nrf_ecb_set_key |
( |
const uint8_t * |
key | ) |
|
Function for setting the key to be used for encryption.
- Parameters
-
| key | Pointer to the key. 16 bytes will be read. |