uint8 key1[16] = {0};
uint8 buf1[16] = {0};
(*pSspAesEncrypt)(key1, buf1); //编译通过
sspAesEncryptHW (key1, buf1); //编译通过
sspAesDecryptHW( key1,buf1); //编译报错
sspAesDecrypt( key1, buf1 ); //编译报错
运行环境: BLE4.0协议栈 1.3.2 或 1.2.1
要实现的目标: 运用AES128 CBC模式 实现应用程序加密 / 解密 功能。
前提 HAL_XXX = TRUE, hal_aes.h 等都正常添加,
(*pSspAesEncrypt)(key1, buf1); //编译通过
sspAesEncryptHW (key1, buf1); //编译通过 这两个加密函数就编译通过,
但是:
sspAesDecryptHW( key1,buf1); //编译报错
sspAesDecrypt( key1, buf1 ); //编译报错 这两个解密函数就编译错误
Error[e46]: Undefined external "sspAesDecryptHW::?relay" referred in hal_aes ( C:\Users\JS\Desktop\BLE-CC254x-1.2.1\Projects\ble\SimpleBLEPeripheral\
CC2541DB\CC2541DK-MINI Keyfob\Obj\hal_aes.r51 )
Error[e46]: Undefined external "sspAesDecrypt::?relay" referred in hal_aes ( C:\Users\JS\Desktop\BLE-CC254x-1.2.1\Projects\ble\SimpleBLEPeripheral\CC2541DB\CC2541DK-MINI Keyfob\Obj\hal_aes.r51 )
Error while running Linker
请大家指教,谢谢!
cedar_xuesong:
sspAesDecryptHW
这两个函数没编译进系统,看看编译选项的AES宏,是否使能了
ziran da:
回复 cedar_xuesong:
使能了,也没用,我是这样使能的:
INT_HEAP_LEN=3072HALNODEBUGOSAL_CBTIMER_NUM_TASKS=1HAL_AES_DMA=TRUEHAL_AES=TRUEHAL_DMA=TRUEPOWER_SAVINGxPLUS_BROADCASTERHAL_LCD=FALSEHAL_LED=TRUECC2540_MINIDKHAL_UART=TRUE
这样子使能了,但是还是会出现那个问题。不知道为什么?