设备管理类
设备管理类接口支持如下,接口定义符合GM/T 0018-2012标准,接口参数与返回值可参考标准文档,算法标识描述可参考GM/T 0006-2012。
int SDF_OpenDevice(void **phDeviceHandle); int SDF_CloseDevice(void *hDeviceHandle); int SDF_OpenSession(void *hDeviceHandle, void **phSessionHandle); int SDF_CloseSession(void *hSessionHandle); int SDF_GetDeviceInfo(void *hSessionHandle, DEVICEINFO *pstDeviceInfo); int SDF_GenerateRandom(void *hSessionHandle, unsigned int uiLength, unsigned char *pucRandom); int SDF_GetPrivateKeyAccessRight(void *hSessionHandle, unsigned int uiKeyIndex, unsigned char *pucPassword, unsigned int uiPwdLength); int SDF_ReleasePrivateKeyAccessRight(void *hSessionHandle, unsigned int uiKeyIndex);
规格限制
- 每个进程只能打开一个device,并发打开的device数为50。
- 全局并发打开的session数最大1000个。
- 内部非对称密钥索引支持范围1-1000。
- 私钥使用权限标识码长度范围8-128字节。
- 随机数最大长度为1MB。
父主题: 支持的API接口介绍