Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
Loading...
Searching...
No Matches
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
21
#ifndef HASHES_SHA512_COMMON_H
22
#define HASHES_SHA512_COMMON_H
23
24
#include <string.h>
25
#include <stdint.h>
26
27
#ifdef __cplusplus
28
extern
"C"
{
29
#endif
30
34
typedef
struct
{
36
uint64_t state[8];
38
uint64_t count[2];
40
unsigned
char
buf[128];
41
}
sha512_common_context_t
;
42
48
void
sha512_common_pad
(
sha512_common_context_t
*ctx);
49
57
void
sha512_common_update
(
sha512_common_context_t
*ctx,
const
void
*data,
size_t
len);
58
67
void
sha512_common_final
(
sha512_common_context_t
*ctx,
void
*digest,
size_t
dig_len);
68
69
#ifdef __cplusplus
70
}
71
#endif
72
74
#endif
/* HASHES_SHA512_COMMON_H */
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:34
Generated on Sat Dec 21 2024 20:58:04 by
1.9.8