pub struct TupleHashXof { /* private fields */ }
Expand description
The TupleHashXOF
extendable-output functions defined in SP800-185
.
§Usage
[dependencies]
tiny-keccak = { version = "2.0.0", features = ["tuple_hash"] }
§Example
let input = b"hello world";
let mut output = [0u8; 64];
let mut hasher = TupleHash::v256(b"");
hasher.update(input);
let mut xof = hasher.into_xof();
xof.squeeze(&mut output[..32]);
xof.squeeze(&mut output[32..]);
TupleHashXof
can be created only by using TupleHash::IntoXof
interface.
Trait Implementations§
Source§impl Clone for TupleHashXof
impl Clone for TupleHashXof
Source§fn clone(&self) -> TupleHashXof
fn clone(&self) -> TupleHashXof
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for TupleHashXof
impl RefUnwindSafe for TupleHashXof
impl Send for TupleHashXof
impl Sync for TupleHashXof
impl Unpin for TupleHashXof
impl UnwindSafe for TupleHashXof
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
)