53 lines
1.7 KiB
C
53 lines
1.7 KiB
C
#ifndef _DEMO_API_H_
|
|
#define _DEMO_API_H_
|
|
|
|
#ifndef _DEMO_TYPEDEF_H_
|
|
#include "demo_typedef.h"
|
|
#endif
|
|
|
|
#ifndef _SUNYARD_H_
|
|
#include "sunyard.h"
|
|
#endif
|
|
|
|
#define DEV_IP "127.0.0.1"
|
|
#define DEV_PORT 8889
|
|
|
|
#define DEV2_IP "127.0.0.1"
|
|
#define DEV2_PORT 8889
|
|
|
|
#define CON_TIMEOUT 5000
|
|
#define DEAL_TIMEOUT 5000
|
|
#define KEYINDEX 0
|
|
#define CHECKINDEX 0
|
|
|
|
void IniOrgData(char *pcData, int iOrgDataLen, int k);
|
|
void PrintHex(const char* Title, unsigned char* Data, int DataLen);
|
|
void HexToBin(int iLen, unsigned char* pucInBuf, unsigned char* pucOutBuf);
|
|
void BinToHex(int iLen, unsigned char* pucInBuf, unsigned char* pucOutBuf);
|
|
int us_difftime(struct timeval start_time, struct timeval end_time);
|
|
int ms_difftime(struct timeval start_time, struct timeval end_time);
|
|
|
|
int SM4_ShortData_Test(void *hHandle);
|
|
int SM4_BatchData_Test(void *hHandle);
|
|
int SM4_LongData_Test(void *hHandle);
|
|
int SM4_LongData_Test_Special(void *hHandle);
|
|
int SM3_ShortHash_Test(void *hHandle);
|
|
int SM3_LongHash_Test(void *hHandle);
|
|
int SM3_LongHash_Test_Special(void *hHandle);
|
|
int SM4Mac_ShortData(void *hHandle);
|
|
int SM4Mac_BatchData(void *hHandle);
|
|
int SM4Mac_LongData(void *hHandle);
|
|
int SM4Mac_LongData_Special(void *hHandle);
|
|
int SM4_ShortData_CheckValue(void *hHandle);
|
|
int SM4_BatchData_CheckValue(void *hHandle);
|
|
int SM4_LongData_CheckValue(void *hHandle);
|
|
|
|
int XN_SM4_Enc_LongData_Test(void *hHandle, int datasize);
|
|
int XN_SM4_Dec_LongData_Test(void *hHandle, int datasize);
|
|
int XN_SM4Mac_LongData_Test(void *hHandle, int singlebytes);
|
|
int XN_SM3_LongHash_Test(void *hHandle, int singlebytes);
|
|
int XN_SM4EncMac_LongData_Test(void *hHandle, int datasize);
|
|
int XN_SM4DecMac_LongData_Test(void *hHandle, int datasize);
|
|
|
|
|
|
#endif |