pub struct VisionCompression;Expand description
Vision pseudo-compression function for 2-to-1 compression.
Uses the standard collision-resistant construction: h(x) = Trunc(p(x) ⊕ x)
where p is the Vision permutation. The inputs are combined, passed through
the permutation, then the original input state is added back before truncating
to the output size. This is the
Matyas–Meyer–Oseas (or
MMO) compression function construction.
Trait Implementations§
Source§impl Clone for VisionCompression
impl Clone for VisionCompression
Source§fn clone(&self) -> VisionCompression
fn clone(&self) -> VisionCompression
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 Debug for VisionCompression
impl Debug for VisionCompression
Source§impl Default for VisionCompression
impl Default for VisionCompression
Source§fn default() -> VisionCompression
fn default() -> VisionCompression
Returns the “default value” for a type. Read more
Source§impl PseudoCompressionFunction<GenericArray<u8, <VisionHasherDigest as OutputSizeUser>::OutputSize>, 2> for VisionCompression
impl PseudoCompressionFunction<GenericArray<u8, <VisionHasherDigest as OutputSizeUser>::OutputSize>, 2> for VisionCompression
fn compress( &self, input: [Output<VisionHasherDigest>; 2], ) -> Output<VisionHasherDigest>
impl CompressionFunction<GenericArray<u8, <VisionHasherDigest as OutputSizeUser>::OutputSize>, 2> for VisionCompression
Auto Trait Implementations§
impl Freeze for VisionCompression
impl RefUnwindSafe for VisionCompression
impl Send for VisionCompression
impl Sync for VisionCompression
impl Unpin for VisionCompression
impl UnwindSafe for VisionCompression
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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