pub struct KmacXof { /* private fields */ }
Expand description
The KMACXOF
extendable-output functions defined in SP800-185
.
§Usage
[dependencies]
tiny-keccak = { version = "2.0.0", features = ["kmac"] }
§Example
let input = b"hello world";
let mut output = [0u8; 64];
let mut kmac = Kmac::v256(b"", b"");
kmac.update(input);
let mut xof = kmac.into_xof();
xof.squeeze(&mut output[..32]);
xof.squeeze(&mut output[32..]);
KmacXof
can be created only by using Kmac::IntoXof
interface.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KmacXof
impl RefUnwindSafe for KmacXof
impl Send for KmacXof
impl Sync for KmacXof
impl Unpin for KmacXof
impl UnwindSafe for KmacXof
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)