16#ifndef HITLS_APP_KEYMGMT_H
17#define HITLS_APP_KEYMGMT_H
20#include "crypt_eal_pkey.h"
25#ifdef HITLS_APP_SM_MODE
26#define HITLS_APP_MAX_KEY_LEN 64
27#define HITLS_APP_UUID_LEN 32
31 uint8_t uuid[HITLS_APP_UUID_LEN];
38 uint8_t key[HITLS_APP_MAX_KEY_LEN];
41 HITLS_APP_KeyAttr attr;
55typedef int32_t (*HITLS_APP_SendFunc)(
void *ctx,
const void *buf, uint32_t len);
68typedef int32_t (*HITLS_APP_RecvFunc)(
void *ctx,
void *buf, uint32_t len);
80int32_t HITLS_KeyMgmtMain(
int argc,
char *argv[]);
94int32_t HITLS_APP_FindKey(
AppProvider *provider, HITLS_APP_SM_Param *smParam, int32_t algId,
95 HITLS_APP_KeyInfo *keyInfo);
109int32_t HITLS_APP_SendKey(
AppProvider *provider, HITLS_APP_SM_Param *smParam, HITLS_APP_SendFunc sendFunc,
void *ctx);
125int32_t HITLS_APP_ReceiveKey(
AppProvider *provider, HITLS_APP_SM_Param *smParam, int32_t iter, int32_t saltLen,
126 HITLS_APP_RecvFunc recvFunc,
void *ctx);
struct EAL_PkeyCtx CRYPT_EAL_PkeyCtx
定义 crypt_eal_pkey.h:108