logo
pub trait ExtendableOutput: Sized {
    type Reader: XofReader;

    fn finalize_xof(self) -> Self::Reader;
    fn finalize_xof_reset(&mut self) -> Self::Reader;

    fn finalize_boxed(self, n: usize) -> Box<[u8]> { ... }
    fn finalize_boxed_reset(&mut self, n: usize) -> Box<[u8]> { ... }
}
Expand description

Trait which describes extendable-output functions (XOF).

Required Associated Types

Reader

Required Methods

Retrieve XOF reader and consume hasher instance.

Retrieve XOF reader and reset hasher instance state.

Provided Methods

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.

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.

Implementors