pub struct XofReader { /* private fields */ }Expand description
A finished sponge that can be squeezed repeatedly.
Xof::finalize_xof consumes the hasher and produces a fixed number of
bytes, which is the right shape for most callers. Rejection sampling is the
exception: it cannot know in advance how much output it needs, because that
depends on how many candidates it throws away. ML-KEM’s SampleNTT is
exactly this case.
Reading is continuous — reading 32 bytes twice gives the same stream as reading 64 once — which is what makes the sampler’s output independent of the chunk size it happens to ask for.
Implementations§
Auto Trait Implementations§
impl Freeze for XofReader
impl RefUnwindSafe for XofReader
impl Send for XofReader
impl Sync for XofReader
impl Unpin for XofReader
impl UnsafeUnpin for XofReader
impl UnwindSafe for XofReader
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