wired
libc-free QUIC/HTTP3 SDK in C for x86_64-linux
Loading...
Searching...
No Matches
sha384.h
1#ifndef HASH_SHA384_H
2#define HASH_SHA384_H
3
4#include "crypto/symmetric/hash/hash/sha512.h"
5
6/* FIPS 180-4 5.3.4 SHA-384: the SHA-512 compression with its own initial
7 * hash value and the digest truncated to 48 bytes. Reuses sha512_ctx
8 * and sha512_update. */
9
10#define SHA384_DIGEST 48
11
12void sha384_init(sha512_ctx* s);
13void sha384_final(sha512_ctx* s, u8 out[SHA384_DIGEST]);
14
15/* One-shot convenience: digest of data[0..len). */
16void sha384(const u8* data, usz len, u8 out[SHA384_DIGEST]);
17
18#endif
Incremental SHA-512 state: running hash, total bytes absorbed, and the partial-block buffer.
Definition sha512.h:13
u64 usz
unsigned size (size_t equivalent)
Definition types.h:20
unsigned char u8
unsigned 8-bit integer / byte
Definition types.h:18