#pragma once#include#ifdef __linux#define _APICALL
#define DLL_PUBLIC __attribute__ ((visibility ("default")))
#else
#define DLL_PUBLIC
#define _APICALL __stdcall
#endif //__linux
static const int8_t CRYPTTYPE_SM2 = 1; //非对称加密,SM2官方推荐模式(256bit加密强度)
static const int8_t CRYPTTYPE_SM4CBC = 2; //对称分组加密,SM4 CBC模式(128bit加密强度)
enum //错误码
{
GMC_ERR_OK= 0, //成功
GMC_ERR_CryptoTypeNotSupport = 1, //不支持该密码系统
GMC_ERR_PubKeyLost = 2, //公钥未设置
GMC_ERR_PriKeyLost = 3, //私钥未设置
GMC_ERR_OperationNotSupportThisCryptoType = 4, //操作不支持目前的密码系统类型。
GMC_ERR_SMALLMEMSIZE = 5, //相关内存长度过小
GMC_ERR_BADALLOCATE = 6, //内存分配失败
GMC_ERR_KEY_LENGTH = 7, //KEY长度不符合
GMC_ERR_KEY_FORMAT = 8, //KEY格式不符合
GMC_ERR_PARAM = 87, //参数错误
GMC_ERR_OP