Trait ExtendableOutput

trait ExtendableOutput: Sized + Update

Trait for hash functions with extendable-output (XOF).

Associated Types

type Reader: TraitBound { trait_: Path { path: "XofReader", id: Id(296), args: None }, generic_params: [], modifier: None }

Reader

Required Methods

fn finalize_xof(self: Self) -> <Self as >::Reader

Retrieve XOF reader and consume hasher instance.

Provided Methods

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

Finalize XOF and write result into out.

fn digest_xof<impl AsRef<[u8]>: AsRef<[u8]>>(input: impl AsRef<[u8]>, output: &mut [u8])
where
    Self: Default

Compute hash of data and write it into output.

fn finalize_boxed(self: Self, output_size: usize) -> Box<[u8]>

Retrieve result into a boxed slice of the specified size and consume the hasher.

Box<[u8]> is used instead of Vec<u8> to save stack space, since they have size of 2 and 3 words respectively.

Implementors