API参考
载入中...
搜索中...
未找到
crypt_iso_provider.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
21
22#ifndef CRYPT_EAL_ISO_PROVIDER_H
23#define CRYPT_EAL_ISO_PROVIDER_H
24
25#ifdef HITLS_CRYPTO_CMVP_ISO19790
26
27#include <stdint.h>
28#include "crypt_eal_entropy.h"
29#include "crypt_eal_implprovider.h"
30#include "crypt_eal_cmvp.h"
31
32#ifdef __cplusplus
33extern "C" {
34#endif /* __cplusplus */
35
36#define CRYPT_PARAM_EVENT 1
37#define CRYPT_PARAM_ALGID 2
38#define CRYPT_PARAM_ALGO_TYPE 3
39#define CRYPT_PARAM_LIB_CTX 4
40
41#define CRYPT_EAL_ISO_ATTR "provider=iso"
42
43typedef struct EalIsoProvCtx {
44 void *libCtx;
45 void *mgrCtx;
46 CRYPT_EAL_Es *es;
47 void *seedCtx;
48 CRYPT_RandSeedMethod seedMethod;
50} CRYPT_EAL_IsoProvCtx;
51
52int32_t CRYPT_EAL_ProviderInit(CRYPT_EAL_ProvMgrCtx *mgrCtx, BSL_Param *param, CRYPT_EAL_Func *capFuncs,
53 CRYPT_EAL_Func **outFuncs, void **provCtx);
54
55#ifdef __cplusplus
56}
57#endif /* __cplusplus */
58
59#endif /* HITLS_CRYPTO_CMVP_ISO19790 */
60#endif /* CRYPT_EAL_ISO_PROVIDER_H */
void(* CRYPT_EAL_CMVP_LogFunc)(CRYPT_EVENT_TYPE oper, CRYPT_ALGO_TYPE type, int32_t id, int32_t err)
Log function for provider.
定义 crypt_eal_cmvp.h:58
定义 crypt_types.h:952