pub struct Kt256<'cs> { /* private fields */ }Expand description
KT256 hasher.
Implementations§
Trait Implementations§
Source§impl AlgorithmName for Kt256<'_>
impl AlgorithmName for Kt256<'_>
Source§impl BlockSizeUser for Kt256<'_>
impl BlockSizeUser for Kt256<'_>
Source§impl CollisionResistance for Kt256<'_>
256-bit collision resistance per RFC 9861 §7.8, conditional on output length: this
figure applies at an output of at least 2 * CollisionResistance = 64 bytes, per the
digest::CollisionResistance trait contract. Kt256 is a XOF with no fixed output size,
so that length is the caller’s choice: at a shorter output, the same contract gives
min(CollisionResistance, OutputSize / 2) bytes — e.g. 128-bit, not 256-bit, at the
32-byte output used in this crate’s examples.
impl CollisionResistance for Kt256<'_>
256-bit collision resistance per RFC 9861 §7.8, conditional on output length: this
figure applies at an output of at least 2 * CollisionResistance = 64 bytes, per the
digest::CollisionResistance trait contract. Kt256 is a XOF with no fixed output size,
so that length is the caller’s choice: at a shorter output, the same contract gives
min(CollisionResistance, OutputSize / 2) bytes — e.g. 128-bit, not 256-bit, at the
32-byte output used in this crate’s examples.
Source§impl ExtendableOutput for Kt256<'_>
impl ExtendableOutput for Kt256<'_>
Source§type Reader = Kt256Reader
type Reader = Kt256Reader
Reader
Source§fn finalize_xof(self) -> <Kt256<'_> as ExtendableOutput>::Reader
fn finalize_xof(self) -> <Kt256<'_> as ExtendableOutput>::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.impl HashMarker for Kt256<'_>
Auto Trait Implementations§
impl<'cs> Freeze for Kt256<'cs>
impl<'cs> RefUnwindSafe for Kt256<'cs>
impl<'cs> Send for Kt256<'cs>
impl<'cs> Sync for Kt256<'cs>
impl<'cs> Unpin for Kt256<'cs>
impl<'cs> UnsafeUnpin for Kt256<'cs>
impl<'cs> UnwindSafe for Kt256<'cs>
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> 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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> SmallBlockSizeUser for T
impl<T> SmallBlockSizeUser for T
Source§type _BlockSize = <T as BlockSizeUser>::BlockSize
type _BlockSize = <T as BlockSizeUser>::BlockSize
Helper associated type equal to
<Self as BlockSizeUser>::BlockSize.