API参考
载入中...
搜索中...
未找到
cmvp_common.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 CMVP_COMMON_H
17#define CMVP_COMMON_H
18
19#include "hitls_build.h"
20#if defined(HITLS_CRYPTO_CMVP_ISO19790) || defined(HITLS_CRYPTO_CMVP_SM) || defined(HITLS_CRYPTO_CMVP_FIPS)
21
22#include <stdint.h>
23#include <stdbool.h>
24#include <syslog.h>
25#include "crypt_cmvp.h"
26#include "crypt_types.h"
27#include "crypt_algid.h"
28
29#ifdef __cplusplus
30extern "C" {
31#endif // __cplusplus
32
33uint8_t *CMVP_StringsToBins(const char *in, uint32_t *outLen); // Converting a hexadecimal string to a buf array
34
35void CMVP_WriteSyslog(const char *ident, int32_t priority, const char *format, ...)
36 __attribute__((format(printf, 3, 4))); // Write syslog
37
38char *CMVP_ReadFile(const char *path, const char *mode, uint32_t *bufLen); // Read file
39
40int32_t CMVP_CheckIntegrity(void *libCtx, const char *attrName, CRYPT_MAC_AlgId macId);
41
42int32_t CMVP_CreateInternalLibCtx(BSL_Param *param, CRYPT_EAL_LibCtx **libCtx, void *func);
43
44bool CMVP_CheckIsInternalLibCtx(BSL_Param *param);
45
46#ifdef __cplusplus
47}
48#endif // __cplusplus
49#endif /* HITLS_CRYPTO_CMVP_ISO19790 || HITLS_CRYPTO_CMVP_SM || HITLS_CRYPTO_CMVP_FIPS */
50#endif // CMVP_COMMON_H
CRYPT_MAC_AlgId
定义 crypt_algid.h:91