sha512_224.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 <inttypes.h>
24 #include <stddef.h>
25 
26 #include "hashes/sha512_common.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
35 #define SHA512_224_DIGEST_LENGTH (28)
36 
40 #define SHA512_224_INTERNAL_BLOCK_SIZE (128)
41 
46 
53 
61 static inline void sha512_224_update(sha512_224_context_t *ctx, const void *data, size_t len)
62 {
63  sha512_common_update(ctx, data, len);
64 }
65 
74 static inline void sha512_224_final(sha512_224_context_t *ctx, void *digest)
75 {
77 }
78 
88 void sha512_224(const void *data, size_t len, void *digest);
89 
90 #ifdef __cplusplus
91 }
92 #endif
93 
void sha512_224_init(sha512_224_context_t *ctx)
SHA-512/224 initialization.
void sha512_224(const void *data, size_t len, void *digest)
A wrapper function to simplify the generation of a hash.
static void sha512_224_final(sha512_224_context_t *ctx, void *digest)
SHA-512/224 finalization.
Definition: sha512_224.h:74
sha512_common_context_t sha512_224_context_t
Context for cipher operations based on sha512_224.
Definition: sha512_224.h:45
#define SHA512_224_DIGEST_LENGTH
Length of SHA512_224 digests in bytes.
Definition: sha512_224.h:35
static void sha512_224_update(sha512_224_context_t *ctx, const void *data, size_t len)
Add bytes into the hash.
Definition: sha512_224.h:61
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.
Definition: sha512_common.h:33