]> git.ipfire.org Git - thirdparty/nettle.git/blob - hkdf.h
Update config.guess and config.sub to 2024-01-01 versions.
[thirdparty/nettle.git] / hkdf.h
1 /* hkdf.h
2
3 TLS PRF code (RFC-5246, RFC-2246).
4
5 Copyright (C) 2017 Red Hat, Inc.
6
7 This file is part of GNU Nettle.
8
9 GNU Nettle is free software: you can redistribute it and/or
10 modify it under the terms of either:
11
12 * the GNU Lesser General Public License as published by the Free
13 Software Foundation; either version 3 of the License, or (at your
14 option) any later version.
15
16 or
17
18 * the GNU General Public License as published by the Free
19 Software Foundation; either version 2 of the License, or (at your
20 option) any later version.
21
22 or both in parallel, as here.
23
24 GNU Nettle is distributed in the hope that it will be useful,
25 but WITHOUT ANY WARRANTY; without even the implied warranty of
26 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
27 General Public License for more details.
28
29 You should have received copies of the GNU General Public License and
30 the GNU Lesser General Public License along with this program. If
31 not, see http://www.gnu.org/licenses/.
32 */
33
34 #ifndef NETTLE_HKDF_H_INCLUDED
35 #define NETTLE_HKDF_H_INCLUDED
36
37 #include "nettle-types.h"
38
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42
43 /* Namespace mangling */
44 #define hkdf_extract nettle_hkdf_extract
45 #define hkdf_expand nettle_hkdf_expand
46
47 void
48 hkdf_extract(void *mac_ctx,
49 nettle_hash_update_func *update,
50 nettle_hash_digest_func *digest,
51 size_t digest_size,
52 size_t secret_size, const uint8_t *secret,
53 uint8_t *dst);
54
55 void
56 hkdf_expand(void *mac_ctx,
57 nettle_hash_update_func *update,
58 nettle_hash_digest_func *digest,
59 size_t digest_size,
60 size_t info_size, const uint8_t *info,
61 size_t length, uint8_t *dst);
62
63 #ifdef __cplusplus
64 }
65 #endif
66
67 #endif /* NETTLE_HKDF_H_INCLUDED */