Skip to main content

Xof

Trait Xof 

Source
pub trait Xof:
    Algorithm
    + Clone
    + Default {
    const BLOCK_LEN: usize;

    // Required methods
    fn update(&mut self, data: &[u8]);
    fn finalize_xof(self, out: &mut [u8]);
}
Expand description

An extendable-output function (XOF) such as SHAKE128 / SHAKE256.

Required Associated Constants§

Source

const BLOCK_LEN: usize

Rate in bytes.

Required Methods§

Source

fn update(&mut self, data: &[u8])

Absorb more input.

Source

fn finalize_xof(self, out: &mut [u8])

Squeeze out.len() bytes of output, consuming the state.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§