pub struct Shake128 { /* private fields */ }Expand description
SHAKE128 extendable-output function (FIPS 202).
Implementations§
Source§impl Shake128
impl Shake128
Sourcepub fn with_domain(domain: u8) -> Result<Self, Error>
pub fn with_domain(domain: u8) -> Result<Self, Error>
Returns a new SHAKE128 instance with a custom domain byte.
§Errors
Returns Error::InvalidValue unless domain is in
0x01..=0x7f.
Sourcepub fn finalize(self) -> Shake128Reader
pub fn finalize(self) -> Shake128Reader
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 SHAKE128 of input with the standard domain, filling output.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Shake128
impl RefUnwindSafe for Shake128
impl Send for Shake128
impl Sync for Shake128
impl Unpin for Shake128
impl UnsafeUnpin for Shake128
impl UnwindSafe for Shake128
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