Skip to content

Commit 8334540

Browse files
rettichschnididkalowsk
authored andcommitted
samples: drivers: crypto: Improve memory alignment
Commit e1e1973 (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 <[email protected]>
1 parent 9cce72d commit 8334540

File tree

1 file changed

+1
-1
lines changed
  • samples/drivers/crypto/src

1 file changed

+1
-1
lines changed

samples/drivers/crypto/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ LOG_MODULE_REGISTER(main);
3737
#error "You need to enable one crypto device"
3838
#endif
3939

40-
const static uint8_t key[16] __aligned(32) = {
40+
const static uint8_t key[16] __aligned(4) = {
4141
0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88,
4242
0x09, 0xcf, 0x4f, 0x3c
4343
};

0 commit comments

Comments
 (0)