GNU libmicrohttpd
1.0.6
Toggle main menu visibility
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 */
42
struct
hash_hd_st;
43
47
#define MHD_SHA256_HAS_EXT_ERROR 1
48
52
struct
Sha256CtxExt
53
{
54
struct
hash_hd_st *
handle
;
55
int
ext_error
;
56
};
57
61
#define MHD_SHA256_HAS_INIT_ONE_TIME 1
62
70
void
71
MHD_SHA256_init_one_time
(
struct
Sha256CtxExt
*ctx);
72
73
81
void
82
MHD_SHA256_update
(
struct
Sha256CtxExt
*ctx,
83
const
uint8_t *
data
,
84
size_t
length);
85
86
90
#define MHD_SHA256_HAS_FINISH_RESET 1
91
98
void
99
MHD_SHA256_finish_reset
(
struct
Sha256CtxExt
*ctx,
100
uint8_t digest[
SHA256_DIGEST_SIZE
]);
101
105
#define MHD_SHA256_HAS_DEINIT 1
106
112
void
113
MHD_SHA256_deinit
(
struct
Sha256CtxExt
*ctx);
114
115
#endif
/* MHD_SHA256_EXT_H */
mhd_options.h
additional automatic macros for MHD_config.h
MHD_SHA256_deinit
#define MHD_SHA256_deinit(ignore)
Definition
mhd_sha256_wrap.h:90
MHD_SHA256_init_one_time
#define MHD_SHA256_init_one_time(ctx)
Definition
mhd_sha256_wrap.h:71
MHD_SHA256_finish_reset
#define MHD_SHA256_finish_reset(ctx, digest)
Definition
mhd_sha256_wrap.h:82
data
void * data
Definition
microhttpd.h:4030
SHA256_DIGEST_SIZE
#define SHA256_DIGEST_SIZE
Definition
sha256.h:55
MHD_SHA256_update
void MHD_SHA256_update(struct Sha256CtxExt *ctx, const uint8_t *data, size_t length)
Definition
sha256_ext.c:67
Sha256CtxExt
Definition
sha256_ext.h:53
Sha256CtxExt::handle
struct hash_hd_st * handle
Definition
sha256_ext.h:54
Sha256CtxExt::ext_error
int ext_error
Definition
sha256_ext.h:55
src
microhttpd
sha256_ext.h
Generated by
1.17.0