pub struct TupleHashXof<X> { /* private fields */ }Expand description
A cryptographic hash over a set of strings such that each string is unambiguously encoded.
For example, the TupleHash of ("abc", "d") will produce
a different hash value than the TupleHash of ("ab", "cd").
§Warning
TupleHash is only defined for cSHAKE128 and cSHAKE256.
Using this with a different XOF might have worse security
properties.
Implementations§
Source§impl<X: Xof> TupleHashXof<X>
impl<X: Xof> TupleHashXof<X>
Sourcepub fn finalize_xof(self) -> TupleHashXofReader<X::Reader>
pub fn finalize_xof(self) -> TupleHashXofReader<X::Reader>
Returns a variable-size output.
Trait Implementations§
Source§impl<X: Clone> Clone for TupleHashXof<X>
impl<X: Clone> Clone for TupleHashXof<X>
Source§fn clone(&self) -> TupleHashXof<X>
fn clone(&self) -> TupleHashXof<X>
Returns a duplicate 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 moreSource§impl<X: Debug> Debug for TupleHashXof<X>
impl<X: Debug> Debug for TupleHashXof<X>
Source§impl<X: Default> Default for TupleHashXof<X>
impl<X: Default> Default for TupleHashXof<X>
Source§fn default() -> TupleHashXof<X>
fn default() -> TupleHashXof<X>
Returns the “default value” for a type. Read more
Source§impl<X: Xof> ExtendableOutput for TupleHashXof<X>
Available on crate feature rust-crypto only.
impl<X: Xof> ExtendableOutput for TupleHashXof<X>
Available on crate feature
rust-crypto only.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.Source§impl<X: Xof> Update for TupleHashXof<X>
Available on crate feature rust-crypto only.
impl<X: Xof> Update for TupleHashXof<X>
Available on crate feature
rust-crypto only.Source§impl<X: Xof> Xof for TupleHashXof<X>
impl<X: Xof> Xof for TupleHashXof<X>
Source§fn finalize_xof(self) -> Self::Reader
fn finalize_xof(self) -> Self::Reader
Returns the output of the XOF.
Source§fn finalize_xof_into(self, out: &mut [u8])
fn finalize_xof_into(self, out: &mut [u8])
Writes the XOF output to
out.impl<X: Xof> HashMarker for TupleHashXof<X>
Available on crate feature
rust-crypto only.Auto Trait Implementations§
impl<X> Freeze for TupleHashXof<X>where
X: Freeze,
impl<X> RefUnwindSafe for TupleHashXof<X>where
X: RefUnwindSafe,
impl<X> Send for TupleHashXof<X>where
X: Send,
impl<X> Sync for TupleHashXof<X>where
X: Sync,
impl<X> Unpin for TupleHashXof<X>where
X: Unpin,
impl<X> UnwindSafe for TupleHashXof<X>where
X: UnwindSafe,
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