Hi,
I'm trying using AES ECB encryption of peripheral drivers on development board with nRF52832 and PCA10040.
I inserted the following code before main loop of ble_app_uart sample in nRF5 SDK version 12.2.
#define SRC ((uint8_t *)"sample 16B text.")
#define AES_KEY ((uint8_t *)"abcdefgh12345678")
int main (void) {
...
uart_init();
ret = nrf_ecb_init();
...
uint8_t crypt[16];
nrf_ecb_set_key(AES_KEY);
ret = nrf_ecb_crypt(crypt, SRC);
for(;;)
{
...
In case that there isn't the last line of nrf_ecb_crypt() before for(;;), it works well. But add it and only waste characters comes on to terminal emulator.
Why it behaves so?
Thanks