Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
sha512_common.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2023 TU Dresden
3
*
4
* This file is subject to the terms and conditions of the GNU Lesser
5
* General Public License v2.1. See the file LICENSE in the top level
6
* directory for more details.
7
*/
8
9
#pragma once
10
23
#include <string.h>
24
#include <stdint.h>
25
26
#ifdef __cplusplus
27
extern
"C"
{
28
#endif
29
33
typedef
struct
{
35
uint64_t state[8];
37
uint64_t count[2];
39
unsigned
char
buf[128];
40
}
sha512_common_context_t
;
41
47
void
sha512_common_pad
(
sha512_common_context_t
*ctx);
48
56
void
sha512_common_update
(
sha512_common_context_t
*ctx,
const
void
*data,
size_t
len);
57
66
void
sha512_common_final
(
sha512_common_context_t
*ctx,
void
*digest,
size_t
dig_len);
67
68
#ifdef __cplusplus
69
}
70
#endif
71
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:33
Generated on Sat Jun 28 2025 19:41:34 by
1.9.1