c函数找不到问题了
.c文件 不知道问题出在哪 说是在.c中#include "crypto_sm1.h"
int main()
{
UINT08 xdata pPlaintext[16] = {/* 16位数据 */};
UINT08 xdata pCiphertext[16]={/* 16位数据 */};
UINT08 xdata pSK[16] = {/* 16位数据 */};
UINT08 xdata pKey[32] = {/* 32位数据 */};
UINT08 value;
UINT08 mode = 0x00;
value = sip_sm1_encrypt (&pCiphertext,&pPlaintext, mode);
if(value ==RTN_SUCCESS)
printf("sip_sm1_encrypt:计算成功!\n");
else
printf("sip_sm1_encrypt:计算失败!\n");
value = sip_sm1_decrypt (&pPlaintext,&pCiphertext, mode);
if(value ==RTN_SUCCESS)
printf("sip_sm1_decrypt:计算成功!\n");
else
printf("sip_sm1_decrypt:计算失败!\n");
value = sip_sm1_loadkey_256 (&pKey,&pSK,mode);
if(value ==RTN_SUCCESS)
printf("sip_sm1_loadkey_256:计算成功!\n");
else
printf("sip_sm1_loadkey_256:计算失败!\n");
return 0;
.h文件
#ifndef CRYPTO_SM1_H_20090331
#define CRYPTO_SM1_H_20090331
UINT08 sip_sm1_encrypt (UINT08 xdata *pCiphertext, UINT08 xdata *pPlaintext, UINT08 mode);
UINT08 sip_sm1_decrypt (UINT08 xdata *pPlaintext, UINT08 xdata *pCiphertext, UINT08 mode);
UINT08 sip_sm1_loadkey_256 (UINT08 xdata *pKey, UINT08 xdata *pSK, UINT08 mode);
#endif