1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// SPDX-License-Identifier: Apache-2.0
// Copyright 2026 Cédric Mesnil <cslashm@pm.me>
//! Minimal hash traits for the krypteia workspace.
//!
//! A deliberately small, RustCrypto-`digest`-inspired surface — just
//! enough for the workspace's own generic code (PRFs, MGF1, the FIPS
//! 204/205 message-encoding helpers) to be written once over any hash.
//! Output sizes are passed as caller-provided slices to keep the trait
//! `no_std` and allocation-free.
/// A fixed-output hash function (SHA-2, SHA-3, …).
/// An extendable-output function (SHAKE128/256, cSHAKE, …).