CC2650上contiki下的AES加密

AES encryption under contiki on CC2650

我目前正在尝试将 AES 加密添加到使用 TI cc2650 sensortag 的现有信标演示。我正在使用 contiki 在 core/lib 下提供的 AES API。 我的主图是这样的:

static const uint8_t AES_key[16] = { 0xC0 , 0xC1 , 0xC2 , 0xC3 ,
                                 0xC4 , 0xC5 , 0xC6 , 0xC7 ,
                                 0xC8 , 0xC9 , 0xCA , 0xCB ,
                                 0xCC , 0xCD , 0xCE , 0xCF };// AES Key

static uint8_t plain_text[16] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
14, 15, 16}; // Plain-text to be encrypted.
const struct aes_128_driver AES_128;
.
.
.
printf("Plain_Text: %d \r\n", plain_text);
AES_128.set_key(AES_key);
AES_128.encrypt(plain_text);
printf("Encrypted_Text: %p\r\n", plain_text);

不幸的是,当我 运行 代码时,纯文本是不可更改的。使用一些额外的打印件,我意识到加密功能正在运行,但输出仍然无法更改。有人可以告诉我我做错了什么吗?

请注意,我已将以下行添加到我的 conf 文件中:

#define AES_128_CONF aes_128_driver

正如@kfx 在评论中指出的那样 const struct aes_128_driver AES_128 隐藏了全局变量。