API参考
载入中...
搜索中...
未找到
crypt_kdf_tls12.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_KDF_TLS12_H
17#define CRYPT_KDF_TLS12_H
18
19#include "hitls_build.h"
20#ifdef HITLS_CRYPTO_KDFTLS12
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 CryptKdfTls12Ctx CRYPT_KDFTLS12_Ctx;
31
39CRYPT_KDFTLS12_Ctx* CRYPT_KDFTLS12_NewCtx(void);
40
51CRYPT_KDFTLS12_Ctx *CRYPT_KDFTLS12_NewCtxEx(void *libCtx, int32_t algId);
52
63int32_t CRYPT_KDFTLS12_SetParam(CRYPT_KDFTLS12_Ctx *ctx, const BSL_Param *param);
64
76int32_t CRYPT_KDFTLS12_Derive(CRYPT_KDFTLS12_Ctx *ctx, uint8_t *out, uint32_t len);
77
87int32_t CRYPT_KDFTLS12_Deinit(CRYPT_KDFTLS12_Ctx *ctx);
88
95void CRYPT_KDFTLS12_FreeCtx(CRYPT_KDFTLS12_Ctx *ctx);
96
104CRYPT_KDFTLS12_Ctx *CRYPT_KDFTLS12_DupCtx(const CRYPT_KDFTLS12_Ctx *ctx);
105
106#ifdef __cplusplus
107}
108#endif // __cplusplus
109
110#endif // HITLS_CRYPTO_KDFTLS12
111
112#endif // CRYPT_KDF_TLS12_H