API参考
载入中...
搜索中...
未找到
crypt_hkdf.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 CRYPT_HKDF_H
17#define CRYPT_HKDF_H
18
19#include "hitls_build.h"
20#ifdef HITLS_CRYPTO_HKDF
21
22#include <stdint.h>
23#include "crypt_local_types.h"
24#include "bsl_params.h"
25
26#ifdef __cplusplus
27extern "C" {
28#endif // __cplusplus
29
30typedef struct CryptHkdfCtx CRYPT_HKDF_Ctx;
31
39CRYPT_HKDF_Ctx* CRYPT_HKDF_NewCtx(void);
40
50CRYPT_HKDF_Ctx* CRYPT_HKDF_NewCtxEx(void *libCtx, int32_t algId);
51
62int32_t CRYPT_HKDF_SetParam(CRYPT_HKDF_Ctx *ctx, const BSL_Param *param);
63
75int32_t CRYPT_HKDF_Derive(CRYPT_HKDF_Ctx *ctx, uint8_t *out, uint32_t len);
76
86int32_t CRYPT_HKDF_Deinit(CRYPT_HKDF_Ctx *ctx);
87
94void CRYPT_HKDF_FreeCtx(CRYPT_HKDF_Ctx *ctx);
95
103CRYPT_HKDF_Ctx *CRYPT_HKDF_DupCtx(const CRYPT_HKDF_Ctx *ctx);
104
105#ifdef __cplusplus
106}
107#endif // __cplusplus
108
109#endif // HITLS_CRYPTO_HKDF
110
111#endif // CRYPT_HKDF_H