Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
Loading...
Searching...
No Matches
sha2xx_common.h
Go to the documentation of this file.
1
/*-
2
* SPDX-FileCopyrightText: 2005 Colin Percival
3
* SPDX-FileCopyrightText: 2013 Christian Mehlis & René Kijewski
4
* SPDX-FileCopyrightText: 2016 Martin Landsmann <martin.landsmann@haw-hamburg.de>
5
* SPDX-FileCopyrightText: 2016 OTA keys S.A.
6
* SPDX-FileCopyrightText: 2020 HAW Hamburg
7
* SPDX-License-Identifier: BSD-2-Clause
8
*/
9
10
#pragma once
11
27
28
#include <string.h>
29
#include <stdint.h>
30
31
#ifdef __cplusplus
32
extern
"C"
{
33
#endif
34
38
typedef
struct
{
40
uint32_t
state
[8];
42
uint32_t
count
[2];
44
unsigned
char
buf
[64];
45
}
sha2xx_context_t
;
46
52
void
sha2xx_pad
(
sha2xx_context_t
*ctx);
53
61
void
sha2xx_update
(
sha2xx_context_t
*ctx,
const
void
*data,
size_t
len);
62
71
void
sha2xx_final
(
sha2xx_context_t
*ctx,
void
*digest,
size_t
dig_len);
72
73
#ifdef __cplusplus
74
}
75
#endif
76
sha2xx_pad
void sha2xx_pad(sha2xx_context_t *ctx)
SHA-2XX initialization.
sha2xx_final
void sha2xx_final(sha2xx_context_t *ctx, void *digest, size_t dig_len)
SHA-2XX finalization.
sha2xx_update
void sha2xx_update(sha2xx_context_t *ctx, const void *data, size_t len)
Add bytes into the hash.
sha2xx_context_t
Structure to hold the SHA-2XX context.
Definition
sha2xx_common.h:38
sha2xx_context_t::buf
unsigned char buf[64]
data buffer
Definition
sha2xx_common.h:44
sha2xx_context_t::state
uint32_t state[8]
global state
Definition
sha2xx_common.h:40
sha2xx_context_t::count
uint32_t count[2]
processed bits counter
Definition
sha2xx_common.h:42
Generated on Sat Jul 25 2026 00:53:09 by
1.13.2