// Copyright (c) 2022, Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
/// FIPS 205 Section 11.2.1 — SHA2-based tweakable hash functions for security category 1 (n=16).
///
/// F, H, T_l, and PRF all share the same core:
/// Trunc_n(SHA-256(PK.seed ‖ toByte(0, 64-n) ‖ ADRSc ‖ M))
///
/// TODO: this only covers the n=16 SHA2 instantiation. Extend to cover:
/// - n ≥ 24 (SHA2-192/256): H and T_l switch to SHA-512 with 128-byte block
/// pad (toByte(0, 128-n)); F and PRF stay on SHA-256. See FIPS 205 §11.2.1.
/// - SLH-DSA-SHAKE-*: the SHAKE256-based construction from §11.2.2, which
/// replaces the whole family with a single XOF — no SHA-256/SHA-512 split,
/// no 64-n padding.
use Digest;
use Sha256;
use Adrs;
const SHA256_BLOCK: usize = 64;
const ZERO_PAD: = ;
/// Core shared by F, H, T_l, and PRF:
/// Trunc_n(SHA-256(PK.seed ‖ toByte(0, 64-n) ‖ ADRSc ‖ M))