Trait ExtendableOutput

Source
pub trait ExtendableOutput: Sized + Update {
    type Reader: XofReader;

    // Required method
    fn finalize_xof(self) -> Self::Reader;

    // Provided methods
    fn finalize_xof_into(self, out: &mut [u8]) { ... }
    fn digest_xof(input: impl AsRef<[u8]>, output: &mut [u8])
       where Self: Default { ... }
}
Expand description

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

Required Associated Types§

Source

type Reader: XofReader

Reader

Required Methods§

Source

fn finalize_xof(self) -> Self::Reader

Retrieve XOF reader and consume hasher instance.

Provided Methods§

Source

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

Finalize XOF and write result into out.

Source

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

Compute hash of data and write it into output.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§