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
//! Hash primitives used by Prikk.
//!
//! `sha256` runs on the audited `sha2` crate. Prikk originally shipped a first-party SHA-256
//! implementation for the initial source drop; DC-50 concluded the ROI no longer favoured
//! maintaining it (identity-bearing maintenance cost, a measured ~5.8x throughput gap, and no
//! remaining supply-chain benefit once `sha2` was already trusted for Ed25519 signing via
//! `ed25519-dalek`), and DC-55 performed the swap after an equivalence campaign proved it changed
//! no existing identity. The outgoing implementation is retained test-only, frozen, as an
//! independent differential reference — see `tests::frozen_outgoing`.
//!
//! `#![forbid(unsafe_code)]` remains true of this crate's own source, but hashing now happens
//! inside `sha2`, whose accelerated backends use `unsafe` internally for CPU-specific
//! instructions. This crate no longer provides an unsafe-free guarantee for hashing by itself.
use ;
/// A 32-byte SHA-256 digest.
pub type Sha256Digest = ;
/// Compute SHA-256 for a byte slice.
/// Convert bytes to lowercase hex.