Trait digest::ExtendableOutput[][src]

pub trait ExtendableOutput: Sized + Update + Default + Reset {
    type Reader: XofReader;
    fn finalize_xof(self) -> Self::Reader;
fn finalize_xof_reset(&mut self) -> Self::Reader; fn digest_xof(input: impl AsRef<[u8]>, output: &mut [u8]) { ... }
fn finalize_boxed(self, output_size: usize) -> Box<[u8]> { ... }
fn finalize_boxed_reset(&mut self, output_size: usize) -> Box<[u8]> { ... } }

Trait which describes extendable-output functions (XOF).

Associated Types

type Reader: XofReader[src]

Reader

Loading content...

Required methods

fn finalize_xof(self) -> Self::Reader[src]

Retrieve XOF reader and consume hasher instance.

fn finalize_xof_reset(&mut self) -> Self::Reader[src]

Retrieve XOF reader and reset hasher instance state.

Loading content...

Provided methods

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

Compute hash of data and write it to output.

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

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.

fn finalize_boxed_reset(&mut self, output_size: usize) -> Box<[u8]>[src]

This is supported on crate feature alloc only.

Retrieve result into a boxed slice of the specified size and reset the hasher's state.

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

Loading content...

Implementors

impl<D: ExtendableOutputCore + Default> ExtendableOutput for UpdateCoreWrapper<D>[src]

This is supported on crate feature core-api only.

type Reader = XofReaderCoreWrapper<D::ReaderCore>

Loading content...