pub struct CShake256 { /* private fields */ }Expand description
cSHAKE256 (customizable SHAKE256) as defined in SP 800-185.
Allows domain separation via a function name and customization string.
When both parameters are empty, CShake256 behaves identically to Shake256.
Implements the Xof trait.
§One-shot API
ⓘ
use crypto::sha3::CShake256;
let mut output = [0u8; 64];
CShake256::hash(b"message", b"FUNCTION", b"customization", &mut output);§Incremental API
ⓘ
use crypto::{sha3::CShake256, Xof};
let mut cshake = CShake256::new(b"FUNCTION", b"customization");
cshake.absorb(b"hello ");
cshake.absorb(b"world");
let mut out = [0u8; 64];
cshake.squeeze(&mut out);Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CShake256
impl RefUnwindSafe for CShake256
impl Send for CShake256
impl Sync for CShake256
impl Unpin for CShake256
impl UnsafeUnpin for CShake256
impl UnwindSafe for CShake256
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