This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
地址偏移量不一样吗
这是有可能的
CC2640r2没有AES的例程,你是在哪里使用的,调用了哪些函数
PS:论坛支持不是实时的,所以没有办法做到立刻回复,还有其他用户的问题需要处理
感谢回答!
1、我是拷贝的 C:\ti\tirtos_cc13xx_cc26xx_2_21_01_08\products\cc26xxware_2_24_03_17272\driverlib 这个目录下的rom_crypto.c 和 rom_crypto.h 文件到工程目录直接使用的。
2、使用的函数是 AES_ECB_EncryptData 和 AES_ECB_DecryptData (代码具体如下)。使用直接将加密数据和秘钥带入函数中。
///////////////////////////////////* AES-128 *//////////////////////////////////
/* AES - ECB */
typedef void(*aes_ecb_encrypt_t)(uint8_t *, uint16_t, uint8_t *);
aes_ecb_encrypt_t aes_ecb_encrypt = (aes_ecb_encrypt_t)(0x10018a99);
typedef void(*aes_ecb_decrypt_t)(uint8_t *, uint16_t, uint8_t *);
aes_ecb_decrypt_t aes_ecb_decrypt= (aes_ecb_decrypt_t)(0x10018ac5);
//*****************************************************************************
// AES_ECB_EncryptData
//*****************************************************************************
void
AES_ECB_EncryptData(uint8_t *text, uint16_t textLen, uint8_t *aesKey)
{
aes_ecb_encrypt(text, textLen, aesKey);
}
//*****************************************************************************
// AES_ECB_DecryptData
//*****************************************************************************
void
AES_ECB_DecryptData(uint8_t *text, uint16_t textLen, uint8_t *aesKey)
{
aes_ecb_decrypt(text, textLen, aesKey);
}
AES 和 SHA ROM 库在 CC2640R2中已弃用,建议使用 Crypto Driver程序,
可在SDK安装路径找到:C:\ti\simplelink_cc2640r2_sdk_5_30_00_03\source\ti\drivers