Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
sha512_common.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2023 TU Dresden
3
* SPDX-License-Identifier: LGPL-2.1-only
4
*/
5
6
#pragma once
7
20
#include <string.h>
21
#include <stdint.h>
22
23
#ifdef __cplusplus
24
extern
"C"
{
25
#endif
26
30
typedef
struct
{
32
uint64_t state[8];
34
uint64_t count[2];
36
unsigned
char
buf[128];
37
}
sha512_common_context_t
;
38
44
void
sha512_common_pad
(
sha512_common_context_t
*ctx);
45
53
void
sha512_common_update
(
sha512_common_context_t
*ctx,
const
void
*data,
size_t
len);
54
63
void
sha512_common_final
(
sha512_common_context_t
*ctx,
void
*digest,
size_t
dig_len);
64
65
#ifdef __cplusplus
66
}
67
#endif
68
sha512_common_pad
void sha512_common_pad(sha512_common_context_t *ctx)
SHA-512 initialization.
sha512_common_update
void sha512_common_update(sha512_common_context_t *ctx, const void *data, size_t len)
Add bytes into the hash.
sha512_common_final
void sha512_common_final(sha512_common_context_t *ctx, void *digest, size_t dig_len)
SHA-512 finalization.
sha512_common_context_t
Structure to hold the SHA-512 context.
Definition:
sha512_common.h:30
Generated on Mon Nov 24 2025 18:43:16 by
1.9.1