Skip to main content

AddrHash

Trait AddrHash 

Source
pub trait AddrHash {
    const LABEL_PREFIX: &'static str;
    const OUTPUT_BYTES: usize;
    const LABEL_BYTES: usize = _;

    // Required method
    fn digest_carrier<const N: usize>(input: &TermValue<'_, N>) -> [u8; 64];
}
Expand description

A prism hasher usable as a UOR-ADDR σ-axis. Fingerprint-width-erased: the κ-label prefix + digest width are associated consts, and digest_carrier folds the carrier through the concrete Hasher<FP_MAX> internally.

Required Associated Constants§

Source

const LABEL_PREFIX: &'static str

The lowercase algorithm token at the head of the κ-label.

Source

const OUTPUT_BYTES: usize

The σ-axis digest width in bytes (Hasher::OUTPUT_BYTES).

Provided Associated Constants§

Source

const LABEL_BYTES: usize = _

Total κ-label ASCII width = LABEL_PREFIX.len() + 1 + 2 × OUTPUT_BYTES. The realization’s output shape declares exactly this many Site constraints, and the entry point returns KappaLabel<{LABEL_BYTES}>.

Required Methods§

Source

fn digest_carrier<const N: usize>(input: &TermValue<'_, N>) -> [u8; 64]

Fold the (streamed) canonical carrier through this σ-axis, returning the digest in a MAX_DIGEST_BYTES buffer (first OUTPUT_BYTES significant; the rest zero). Bounded resident memory — never materializes the carrier.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl AddrHash for Blake3Hasher

Source§

const LABEL_PREFIX: &'static str = "blake3"

Source§

const OUTPUT_BYTES: usize = 32

Source§

impl AddrHash for Keccak256Hasher

Source§

const LABEL_PREFIX: &'static str = "keccak256"

Source§

const OUTPUT_BYTES: usize = 32

Source§

impl AddrHash for Sha3_256Hasher

Source§

const LABEL_PREFIX: &'static str = "sha3-256"

Source§

const OUTPUT_BYTES: usize = 32

Source§

impl AddrHash for Sha256Hasher

Source§

const LABEL_PREFIX: &'static str = "sha256"

Source§

const OUTPUT_BYTES: usize = 32

Source§

impl AddrHash for Sha512Hasher

Source§

const LABEL_PREFIX: &'static str = "sha512"

Source§

const OUTPUT_BYTES: usize = 64