Loading...
Searching...
No Matches
sha512_256.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
19
20#include <inttypes.h>
21#include <stddef.h>
22
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
32#define SHA512_256_DIGEST_LENGTH (32)
33
37#define SHA512_256_INTERNAL_BLOCK_SIZE (128)
38
43
50
58static inline void sha512_256_update(sha512_256_context_t *ctx, const void *data, size_t len)
59{
60 sha512_common_update(ctx, data, len);
61}
62
71static inline void sha512_256_final(sha512_256_context_t *ctx, void *digest)
72{
74}
75
85void sha512_256(const void *data, size_t len, void *digest);
86
87#ifdef __cplusplus
88}
89#endif
90
void sha512_256(const void *data, size_t len, void *digest)
A wrapper function to simplify the generation of a hash.
void sha512_256_init(sha512_256_context_t *ctx)
SHA-512/256 initialization.
sha512_common_context_t sha512_256_context_t
Context for cipher operations based on sha512_256.
Definition sha512_256.h:42
#define SHA512_256_DIGEST_LENGTH
Length of SHA512_256 digests in bytes.
Definition sha512_256.h:32
static void sha512_256_final(sha512_256_context_t *ctx, void *digest)
SHA-512/256 finalization.
Definition sha512_256.h:71
static void sha512_256_update(sha512_256_context_t *ctx, const void *data, size_t len)
Add bytes into the hash.
Definition sha512_256.h:58
void sha512_common_update(sha512_common_context_t *ctx, const void *data, size_t len)
Add bytes into the hash.
void sha512_common_final(sha512_common_context_t *ctx, void *digest, size_t dig_len)
SHA-512 finalization.
Adds include for missing inttype definitions.
Common definitions for the SHA-512 hash function.
Structure to hold the SHA-512 context.