pub struct DigestXof<H: Digest + Clone>(/* private fields */);Expand description
Wraps any Digest hash into an ExtendableOutput
function using counter-mode expansion.
seed = H(absorbed_data)
block_i = H(seed || i.to_le_bytes()) for i = 0, 1, 2, ...Trait Implementations§
Source§impl<H: Digest + Clone> ExtendableOutput for DigestXof<H>
impl<H: Digest + Clone> ExtendableOutput for DigestXof<H>
Source§type Reader = DigestXofReader<H>
type Reader = DigestXofReader<H>
Reader
Source§fn finalize_xof(self) -> Self::Reader
fn finalize_xof(self) -> Self::Reader
Retrieve XOF reader and consume hasher instance.
Source§fn finalize_xof_into(self, out: &mut [u8])
fn finalize_xof_into(self, out: &mut [u8])
Finalize XOF and write result into
out.Source§impl<H: Digest + Clone> OutputSizeUser for DigestXof<H>
impl<H: Digest + Clone> OutputSizeUser for DigestXof<H>
Source§type OutputSize = <H as OutputSizeUser>::OutputSize
type OutputSize = <H as OutputSizeUser>::OutputSize
Size of the output in bytes.
Source§fn output_size() -> usize
fn output_size() -> usize
Return output size in bytes.
Auto Trait Implementations§
impl<H> Freeze for DigestXof<H>where
H: Freeze,
impl<H> RefUnwindSafe for DigestXof<H>where
H: RefUnwindSafe,
impl<H> Send for DigestXof<H>where
H: Send,
impl<H> Sync for DigestXof<H>where
H: Sync,
impl<H> Unpin for DigestXof<H>where
H: Unpin,
impl<H> UnsafeUnpin for DigestXof<H>where
H: UnsafeUnpin,
impl<H> UnwindSafe for DigestXof<H>where
H: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more