pub struct Shake256 { /* private fields */ }Expand description
SHAKE256 extendable-output function (FIPS 202).
Implementations§
Source§impl Shake256
impl Shake256
Sourcepub fn with_domain(domain: u8) -> Result<Self, Error>
pub fn with_domain(domain: u8) -> Result<Self, Error>
Returns a new SHAKE256 instance with a custom domain byte.
§Errors
Returns Error::InvalidValue unless domain is in
0x01..=0x7f.
Sourcepub fn finalize(self) -> Shake256Reader
pub fn finalize(self) -> Shake256Reader
Finishes absorbing and returns a reader for the output stream.
Sourcepub fn compute_into_bytes<Output: MutBytes + ?Sized, Input: Bytes + ?Sized>(
output: &mut Output,
input: &Input,
)
pub fn compute_into_bytes<Output: MutBytes + ?Sized, Input: Bytes + ?Sized>( output: &mut Output, input: &Input, )
Computes SHAKE256 of input with the standard domain, filling output.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Shake256
impl RefUnwindSafe for Shake256
impl Send for Shake256
impl Sync for Shake256
impl Unpin for Shake256
impl UnsafeUnpin for Shake256
impl UnwindSafe for Shake256
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