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