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
Auto Trait Implementations§
impl Freeze for TupleHashXof
impl RefUnwindSafe for TupleHashXof
impl Send for TupleHashXof
impl Sync for TupleHashXof
impl Unpin for TupleHashXof
impl UnsafeUnpin 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