samples: drivers: crypto: Improve memory alignment

Commit e1e19732bc (samples: drivers:
crypto: Aligned AES key) introduced the alignment for the key. According
to the commit message, the intention was to align the variable at 32 bit
boundaries. For this reason, passing 32 to __aligned seems like an
error, as its argument is denoted in byte and not bits.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
This commit is contained in:
Reto Schneider 2024-10-03 19:26:45 +02:00 committed by Dan Kalowsky
parent 9cce72daa1
commit 83345401d6

View File

@ -37,7 +37,7 @@ LOG_MODULE_REGISTER(main);
#error "You need to enable one crypto device"
#endif
const static uint8_t key[16] __aligned(32) = {
const static uint8_t key[16] __aligned(4) = {
0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88,
0x09, 0xcf, 0x4f, 0x3c
};