pub struct TupleHash<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").
For the XOF variant, see TupleHashXof.
§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> TupleHash<X>
impl<X: Xof> TupleHash<X>
Sourcepub fn finalize_into(self, out: &mut [u8])
pub fn finalize_into(self, out: &mut [u8])
Returns a fixed-size output.
Sourcepub fn finalize<N: ArrayLength>(self) -> GenericArray<u8, N>
pub fn finalize<N: ArrayLength>(self) -> GenericArray<u8, N>
Returns a fixed-size output.
Trait Implementations§
impl<X: Xof> HashMarker for TupleHash<X>
Available on crate feature
rust-crypto only.Auto Trait Implementations§
impl<X> Freeze for TupleHash<X>where
X: Freeze,
impl<X> RefUnwindSafe for TupleHash<X>where
X: RefUnwindSafe,
impl<X> Send for TupleHash<X>where
X: Send,
impl<X> Sync for TupleHash<X>where
X: Sync,
impl<X> Unpin for TupleHash<X>where
X: Unpin,
impl<X> UnwindSafe for TupleHash<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