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.

Implementors§

source§

impl<T> ExtendableOutput for CoreWrapper<T>where T: ExtendableOutputCore, <T as BlockSizeUser>::BlockSize: IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>, <<T as BlockSizeUser>::BlockSize as IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero, <<T as ExtendableOutputCore>::ReaderCore as BlockSizeUser>::BlockSize: IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>, <<<T as ExtendableOutputCore>::ReaderCore as BlockSizeUser>::BlockSize as IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero,