API参考
载入中...
搜索中...
未找到
eal_pkey.h
1/*
2 * This file is part of the openHiTLS project.
3 *
4 * openHiTLS is licensed under the Mulan PSL v2.
5 * You can use this software according to the terms and conditions of the Mulan PSL v2.
6 * You may obtain a copy of Mulan PSL v2 at:
7 *
8 * http://license.coscl.org.cn/MulanPSL2
9 *
10 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
11 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
12 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
13 * See the Mulan PSL v2 for more details.
14 */
15
16#ifndef EAL_PKEY_H
17#define EAL_PKEY_H
18
19#include "crypt_eal_pkey.h"
20#include "crypt_eal_provider.h"
21#include "crypt_local_types.h"
22
23#ifdef __cplusplus
24extern "C" {
25#endif // __cplusplus
26
27typedef struct {
28 int32_t algId;
29 CRYPT_EAL_ProvMgrCtx *mgrCtx;
30 EAL_PkeyUnitaryMethod keyMgmtMethod;
32
33typedef struct {
34 CRYPT_EAL_ProvMgrCtx *mgrCtx;
35 const CRYPT_EAL_Func *funcsAsyCipher;
36 const CRYPT_EAL_Func *funcsExch;
37 const CRYPT_EAL_Func *funcSign;
38 const CRYPT_EAL_Func *funcKem;
39 const CRYPT_EAL_Func *funcsKeyMgmt;
41
52
62int32_t CRYPT_EAL_GetPkeyAlgInfo(CRYPT_EAL_LibCtx *libCtx, int32_t algId, const char *attrName,
63 CRYPT_EAL_PkeyMgmtInfo *pkeyAlgInfo);
64
65int32_t CRYPT_EAL_SetPkeyMethod(EAL_PkeyUnitaryMethod *method, const CRYPT_EAL_Func *funcsKeyMgmt,
66 const CRYPT_EAL_Func *funcsAsyCipher, const CRYPT_EAL_Func *funcsExch, const CRYPT_EAL_Func *funcSign,
67 const CRYPT_EAL_Func *funcKem);
68
69int32_t CRYPT_EAL_ProviderGetAsyAlgFuncs(CRYPT_EAL_LibCtx *libCtx, int32_t algId, uint32_t pkeyOperType,
70 const char *attrName, CRYPT_EAL_AsyAlgFuncsInfo *funcs);
71#ifdef __cplusplus
72}
73#endif // __cplusplus
74
75#endif // EAL_PKEY_H
struct EAL_PkeyCtx CRYPT_EAL_PkeyCtx
定义 crypt_eal_pkey.h:108
int32_t CRYPT_EAL_GetPkeyAlgInfo(CRYPT_EAL_LibCtx *libCtx, int32_t algId, const char *attrName, CRYPT_EAL_PkeyMgmtInfo *pkeyAlgInfo)
Get the key management information by algorithm ID and attribute name.
CRYPT_EAL_PkeyCtx * CRYPT_EAL_MakeKeyByPkeyAlgInfo(CRYPT_EAL_PkeyMgmtInfo *pkeyAlgInfo, void *keyRef)
Create a new asymmetric key context by key management information.
定义 eal_pkey.h:33
定义 crypt_types.h:952
定义 eal_pkey.h:27
定义 crypt_local_types.h:175