pub struct LtHash { /* private fields */ }
Expand description
An additive homomorphic hash function over crate::Blake3.
Implementations§
Source§impl LtHash
impl LtHash
Sourcepub fn add(&mut self, data: &[u8])
pub fn add(&mut self, data: &[u8])
Add data.
The order of additions doesn’t matter. Each element is expanded to 1024 16-bit integers and added component-wise with modular arithmetic (mod 2^16).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LtHash
impl RefUnwindSafe for LtHash
impl Send for LtHash
impl Sync for LtHash
impl Unpin for LtHash
impl UnwindSafe for LtHash
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§impl<T> Encode for Twhere
T: Write + EncodeSize,
impl<T> Encode for Twhere
T: Write + EncodeSize,
Source§impl<T> EncodeFixed for T
impl<T> EncodeFixed for T
Source§impl<T> EncodeSize for Twhere
T: FixedSize,
impl<T> EncodeSize for Twhere
T: FixedSize,
Source§fn encode_size(&self) -> usize
fn encode_size(&self) -> usize
Returns the encoded size of this value (in bytes).
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more