pub struct Blake3Hasher { /* private fields */ }Expand description
BLAKE3 hasher. 32-byte digest (the standard BLAKE3 output width; XOF mode is not exposed at the axis level).
Trait Implementations§
Source§impl AxisExtension for Blake3Hasher
impl AxisExtension for Blake3Hasher
Source§const AXIS_ADDRESS: &'static str = <Blake3Hasher as HashAxis>::AXIS_ADDRESS
const AXIS_ADDRESS: &'static str = <Blake3Hasher as HashAxis>::AXIS_ADDRESS
ADR-017 content address of this axis trait. The SDK macro
derives this from the trait name and method signatures.
Source§const MAX_OUTPUT_BYTES: usize = <Blake3Hasher as HashAxis>::MAX_OUTPUT_BYTES
const MAX_OUTPUT_BYTES: usize = <Blake3Hasher as HashAxis>::MAX_OUTPUT_BYTES
Maximum bytes any kernel of this axis returns.
Source§fn dispatch_kernel(
kernel_id: u32,
input: &[u8],
out: &mut [u8],
) -> Result<usize, ShapeViolation>
fn dispatch_kernel( kernel_id: u32, input: &[u8], out: &mut [u8], ) -> Result<usize, ShapeViolation>
Dispatch the kernel identified by
kernel_id against the
evaluated input bytes. The implementation copies the kernel’s
output into out and returns the written length. Read moreSource§impl Clone for Blake3Hasher
impl Clone for Blake3Hasher
Source§fn clone(&self) -> Blake3Hasher
fn clone(&self) -> Blake3Hasher
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Blake3Hasher
impl Debug for Blake3Hasher
Source§impl Default for Blake3Hasher
impl Default for Blake3Hasher
Source§fn default() -> Blake3Hasher
fn default() -> Blake3Hasher
Returns the “default value” for a type. Read more
Source§impl HashAxis for Blake3Hasher
impl HashAxis for Blake3Hasher
Source§impl Hasher for Blake3Hasher
impl Hasher for Blake3Hasher
Source§const OUTPUT_BYTES: usize = BLAKE3_BYTES
const OUTPUT_BYTES: usize = BLAKE3_BYTES
Active output width in bytes. Must lie within the bounds
the application’s selected
HostBounds declares —
[<B as HostBounds>::FINGERPRINT_MIN_BYTES, FP_MAX].Source§fn initial() -> Blake3Hasher
fn initial() -> Blake3Hasher
Initial hasher state.
Source§fn fold_byte(self, b: u8) -> Blake3Hasher
fn fold_byte(self, b: u8) -> Blake3Hasher
Fold a single byte into the running state.
Source§fn fold_bytes(self, bytes: &[u8]) -> Blake3Hasher
fn fold_bytes(self, bytes: &[u8]) -> Blake3Hasher
Fold a slice of bytes (default impl: byte-by-byte).
Source§impl SubstrateTermBody for Blake3Hasher
impl SubstrateTermBody for Blake3Hasher
Source§fn body_arena() -> &'static [Term]
fn body_arena() -> &'static [Term]
The Term arena the kernel decomposes to. Empty slice signals a
primitive-fast-path axis whose body the implementation may evaluate
through
dispatch_kernel directly per ADR-055’s optional fast-path.Auto Trait Implementations§
impl Freeze for Blake3Hasher
impl RefUnwindSafe for Blake3Hasher
impl Send for Blake3Hasher
impl Sync for Blake3Hasher
impl Unpin for Blake3Hasher
impl UnsafeUnpin for Blake3Hasher
impl UnwindSafe for Blake3Hasher
Blanket Implementations§
Source§impl<H> AxisTuple for Hwhere
H: Hasher,
impl<H> AxisTuple for Hwhere
H: Hasher,
Source§const AXIS_COUNT: usize = 1
const AXIS_COUNT: usize = 1
Number of axes carried in this tuple.
Source§const MAX_OUTPUT_BYTES: usize = <H as crate::enforcement::Hasher>::OUTPUT_BYTES
const MAX_OUTPUT_BYTES: usize = <H as crate::enforcement::Hasher>::OUTPUT_BYTES
Maximum kernel-output byte width across all axes in this tuple.
Source§fn dispatch(
axis_index: u32,
kernel_id: u32,
input: &[u8],
out: &mut [u8],
) -> Result<usize, ShapeViolation>
fn dispatch( axis_index: u32, kernel_id: u32, input: &[u8], out: &mut [u8], ) -> Result<usize, ShapeViolation>
Dispatch a kernel against the axis at
axis_index. Returns
the kernel’s output bytes (length up to [MAX_OUTPUT_BYTES]). Read moreSource§fn body_arena_at(_axis_index: u32) -> &'static [Term]
fn body_arena_at(_axis_index: u32) -> &'static [Term]
ADR-055: return the substrate-Term body arena for the axis at
axis_index. An empty slice means the axis is a primitive-fast-path
axis whose body is byte-output-equivalent to its dispatch_kernel.
Non-empty slices carry the recursive-fold decomposition the
catamorphism walks per ADR-055’s amended Term::AxisInvocation
fold-rule.Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more