pub trait HashAxis: AxisExtension {
const AXIS_ADDRESS: &'static str = "https://uor.foundation/axis/HashAxis";
const MAX_OUTPUT_BYTES: usize = 64;
// Required method
fn hash(input: &[u8], out: &mut [u8]) -> Result<usize, ShapeViolation>;
}Expand description
Wiki ADR-031 canonical hash-function family.
Single kernel hash(input: &[u8], out: &mut [u8]) emitting the
digest of input into the first Self::MAX_OUTPUT_BYTES of
out. Per ADR-030’s signature constraint every axis-kernel
method takes (input: &[u8], out: &mut [u8]) -> Result<usize, ShapeViolation>;
HashAxis exposes only one kernel because per-impl
(Sha256Hasher / Sha512Hasher / Sha3_256Hasher / Keccak256Hasher
/ Blake3Hasher) the axis position in the model’s AxisTuple
already commits to a single digest family.
Provided Associated Constants§
const AXIS_ADDRESS: &'static str = "https://uor.foundation/axis/HashAxis"
const MAX_OUTPUT_BYTES: usize = 64
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.