GNU libmicrohttpd 1.0.2
Loading...
Searching...
No Matches
sha256_ext.h
Go to the documentation of this file.
1/*
2 This file is part of GNU libmicrohttpd
3 Copyright (C) 2022 Evgeny Grin (Karlson2k)
4
5 GNU libmicrohttpd is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with GNU libmicrohttpd.
17 If not, see <http://www.gnu.org/licenses/>.
18*/
19
25
26#ifndef MHD_SHA256_EXT_H
27#define MHD_SHA256_EXT_H 1
28
29#include "mhd_options.h"
30#include <stdint.h>
31#ifdef HAVE_STDDEF_H
32#include <stddef.h> /* for size_t */
33#endif /* HAVE_STDDEF_H */
34
39#define SHA256_DIGEST_SIZE (32)
40
41/* Actual declaration is in GnuTLS lib header */
42struct hash_hd_st;
43
47#define MHD_SHA256_HAS_EXT_ERROR 1
48
53{
54 struct hash_hd_st *handle;
56};
57
61#define MHD_SHA256_HAS_INIT_ONE_TIME 1
62
70void
72
73
81void
83 const uint8_t *data,
84 size_t length);
85
86
90#define MHD_SHA256_HAS_FINISH_RESET 1
91
98void
100 uint8_t digest[SHA256_DIGEST_SIZE]);
101
105#define MHD_SHA256_HAS_DEINIT 1
106
112void
113MHD_SHA256_deinit (struct Sha256CtxExt *ctx);
114
115#endif /* MHD_SHA256_EXT_H */
additional automatic macros for MHD_config.h
#define MHD_SHA256_deinit(ignore)
#define MHD_SHA256_init_one_time(ctx)
#define MHD_SHA256_finish_reset(ctx, digest)
void * data
#define SHA256_DIGEST_SIZE
Definition sha256.h:55
void MHD_SHA256_update(struct Sha256CtxExt *ctx, const uint8_t *data, size_t length)
Definition sha256_ext.c:67
struct hash_hd_st * handle
Definition sha256_ext.h:54