logo
pub trait ExtendableOutput: Sized + Update {
    type Reader: XofReader;
    fn finalize_xof(self) -> Self::Reader;

    fn finalize_xof_into(self, out: &mut [u8]) { ... }
fn digest_xof(input: impl AsRef<[u8]>, output: &mut [u8])
    where
        Self: Default
, { ... }
fn finalize_boxed(self, output_size: usize) -> Box<[u8]> { ... } }
Expand description

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

Associated Types

Reader

Required methods

Retrieve XOF reader and consume hasher instance.

Provided methods

Finalize XOF and write result into out.

Compute hash of data and write it into output.

This is supported on crate feature alloc only.

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