API参考
载入中...
搜索中...
未找到
eal_pkey_local.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_LOCAL_H
17#define EAL_PKEY_LOCAL_H
18
19#include "hitls_build.h"
20#if defined(HITLS_CRYPTO_EAL) && defined(HITLS_CRYPTO_PKEY)
21
22#include <stdint.h>
23#include "crypt_algid.h"
24#include "crypt_local_types.h"
25#include "crypt_eal_pkey.h"
26#include "sal_atomic.h"
27
28#ifdef __cplusplus
29extern "C" {
30#endif // __cplusplus
31
37struct EAL_PkeyCtx {
38 bool isProvider;
39 EAL_PkeyUnitaryMethod method;
40 void *key;
41 void *extData;
43 BSL_SAL_RefCount references;
44};
45
55const EAL_PkeyMethod *CRYPT_EAL_PkeyFindMethod(CRYPT_PKEY_AlgId id);
56
57int32_t PkeyProviderSetPara(CRYPT_EAL_PkeyCtx *pkey, const CRYPT_EAL_PkeyPara *para);
58
59int32_t PkeyProviderGetPara(const CRYPT_EAL_PkeyCtx *pkey, CRYPT_EAL_PkeyPara *para);
60
61int32_t PkeyProviderSetPrv(CRYPT_EAL_PkeyCtx *pkey, const CRYPT_EAL_PkeyPrv *key);
62
63int32_t PkeyProviderSetPub(CRYPT_EAL_PkeyCtx *pkey, const CRYPT_EAL_PkeyPub *key);
64
65int32_t PkeyProviderGetPrv(const CRYPT_EAL_PkeyCtx *pkey, CRYPT_EAL_PkeyPrv *key);
66
67int32_t PkeyProviderGetPub(const CRYPT_EAL_PkeyCtx *pkey, CRYPT_EAL_PkeyPub *key);
68
69#ifdef __cplusplus
70}
71#endif // __cplusplus
72
73#endif // HITLS_CRYPTO_PKEY
74
75#endif // EAL_PKEY_LOCAL_H
CRYPT_PKEY_AlgId
定义 crypt_algid.h:121
struct EAL_PkeyCtx CRYPT_EAL_PkeyCtx
定义 crypt_eal_pkey.h:108
定义 crypt_eal_pkey.h:91
定义 crypt_eal_pkey.h:68
定义 crypt_eal_pkey.h:40
定义 crypt_local_types.h:143