pub struct CShake<const RATE: usize> { /* private fields */ }Expand description
cSHAKE hasher generic over rate.
Rate MUST be either 168 or 136 for cSHAKE128 and cSHAKE256 respectively.
Implementations§
Source§impl<const RATE: usize> CShake<RATE>
impl<const RATE: usize> CShake<RATE>
Sourcepub fn new_with_function_name(
function_name: &[u8],
customization: &[u8],
) -> Self
pub fn new_with_function_name( function_name: &[u8], customization: &[u8], ) -> Self
Creates a new cSHAKE instance with the given function name and customization.
Note that the function name is intended for use by NIST and should only be set to values defined by NIST. You probably don’t need to use this function.
Trait Implementations§
Source§impl<const RATE: usize> AlgorithmName for CShake<RATE>
impl<const RATE: usize> AlgorithmName for CShake<RATE>
Source§impl<const RATE: usize> CustomizedInit for CShake<RATE>
impl<const RATE: usize> CustomizedInit for CShake<RATE>
Source§fn new_customized(customization: &[u8]) -> Self
fn new_customized(customization: &[u8]) -> Self
Create new hasher instance with the given customization string.
Source§impl<const RATE: usize> ExtendableOutput for CShake<RATE>
impl<const RATE: usize> ExtendableOutput for CShake<RATE>
Source§type Reader = CShakeReader<RATE>
type Reader = CShakeReader<RATE>
Reader
Source§fn finalize_xof(self) -> Self::Reader
fn finalize_xof(self) -> Self::Reader
Retrieve XOF reader and consume hasher instance.
Source§fn finalize_xof_into(self, out: &mut [u8])
fn finalize_xof_into(self, out: &mut [u8])
Finalize XOF and write result into
out.impl<const RATE: usize> HashMarker for CShake<RATE>
impl<const RATE: usize> ZeroizeOnDrop for CShake<RATE>
Available on crate feature
zeroize only.Auto Trait Implementations§
impl<const RATE: usize> Freeze for CShake<RATE>
impl<const RATE: usize> RefUnwindSafe for CShake<RATE>
impl<const RATE: usize> Send for CShake<RATE>
impl<const RATE: usize> Sync for CShake<RATE>
impl<const RATE: usize> Unpin for CShake<RATE>
impl<const RATE: usize> UnsafeUnpin for CShake<RATE>
impl<const RATE: usize> UnwindSafe for CShake<RATE>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> TryCustomizedInit for Twhere
T: CustomizedInit,
impl<T> TryCustomizedInit for Twhere
T: CustomizedInit,
Source§type Error = Infallible
type Error = Infallible
Error returned for invalid customization strings.
Source§fn try_new_customized(
customization: &[u8],
) -> Result<T, <T as TryCustomizedInit>::Error>
fn try_new_customized( customization: &[u8], ) -> Result<T, <T as TryCustomizedInit>::Error>
Create new hasher instance with the given customization string. Read more