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