Loading...
Searching...
No Matches
sha512.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_H
22#define HASHES_SHA512_H
23
24#include <inttypes.h>
25#include <stddef.h>
26
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
36#define SHA512_DIGEST_LENGTH (64)
37
41#define SHA512_INTERNAL_BLOCK_SIZE (128)
42
47
48
55
63static inline void sha512_update(sha512_context_t *ctx, const void *data, size_t len)
64{
65 sha512_common_update(ctx, data, len);
66}
67
76static inline void sha512_final(sha512_context_t *ctx, void *digest)
77{
79}
80
90void sha512(const void *data, size_t len, void *digest);
91
92#ifdef __cplusplus
93}
94#endif
95
97#endif /* HASHES_SHA512_H */
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.
void sha512_init(sha512_context_t *ctx)
SHA-512 initialization.
#define SHA512_DIGEST_LENGTH
Length of SHA512 digests in bytes.
Definition sha512.h:36
void sha512(const void *data, size_t len, void *digest)
A wrapper function to simplify the generation of a hash.
static void sha512_final(sha512_context_t *ctx, void *digest)
SHA-512 finalization.
Definition sha512.h:76
static void sha512_update(sha512_context_t *ctx, const void *data, size_t len)
Add bytes into the hash.
Definition sha512.h:63
sha512_common_context_t sha512_context_t
Context for cipher operations based on sha512.
Definition sha512.h:46
Adds include for missing inttype definitions.
Common definitions for the SHA-512 hash function.
Structure to hold the SHA-512 context.