Loading...
Searching...
No Matches
sha384.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 SHA384_DIGEST_LENGTH (48)
33
37#define SHA384_INTERNAL_BLOCK_SIZE (128)
38
43
50
58static inline void sha384_update(sha384_context_t *ctx, const void *data, size_t len)
59{
60 sha512_common_update(ctx, data, len);
61}
62
71static inline void sha384_final(sha384_context_t *ctx, void *digest)
72{
74}
75
85void sha384(const void *data, size_t len, void *digest);
86
87#ifdef __cplusplus
88}
89#endif
90
static void sha384_final(sha384_context_t *ctx, void *digest)
SHA-384 finalization.
Definition sha384.h:71
#define SHA384_DIGEST_LENGTH
Length of SHA384 digests in bytes.
Definition sha384.h:32
static void sha384_update(sha384_context_t *ctx, const void *data, size_t len)
Add bytes into the hash.
Definition sha384.h:58
void sha384_init(sha384_context_t *ctx)
SHA-384 initialization.
void sha384(const void *data, size_t len, void *digest)
A wrapper function to simplify the generation of a hash.
sha512_common_context_t sha384_context_t
Context for cipher operations based on sha384.
Definition sha384.h:42
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.