Struct ed448_verifier::digest::XofDigest

source ·
pub struct XofDigest<T, OutputSize>
where T: ExtendableOutput, OutputSize: ArrayLength<u8> + 'static,
{ /* private fields */ }
Expand description

Adapter for an extendable output function (XOF) to make it a Digest with a fixed output size.

Implementations§

source§

impl<T, OutputSize> XofDigest<T, OutputSize>
where T: ExtendableOutput, OutputSize: ArrayLength<u8> + 'static,

source

pub fn from_xof(xof: T) -> Self

Makes a given XOF a [Digest].

Trait Implementations§

source§

impl<T, OutputSize> Digest for XofDigest<T, OutputSize>
where T: ExtendableOutput + Update + Default, OutputSize: ArrayLength<u8> + 'static,

source§

fn new() -> Self

Create new hasher instance.
source§

fn new_with_prefix(data: impl AsRef<[u8]>) -> Self

Create new hasher instance which has processed the provided data.
source§

fn update(&mut self, data: impl AsRef<[u8]>)

Process data, updating the internal state.
source§

fn chain_update(self, data: impl AsRef<[u8]>) -> Self

Process input data in a chained manner.
source§

fn finalize(self) -> Output<Self>

Retrieve result and consume hasher instance.
source§

fn finalize_into(self, out: &mut Output<Self>)

Write result into provided array and consume the hasher instance.
source§

fn finalize_reset(&mut self) -> Output<Self>

Retrieve result and reset hasher instance.
source§

fn finalize_into_reset(&mut self, out: &mut Output<Self>)

Write result into provided array and reset the hasher instance.
source§

fn reset(&mut self)

Reset hasher instance to its initial state.
source§

fn output_size() -> usize

Get output size of the hasher
source§

fn digest(data: impl AsRef<[u8]>) -> Output<Self>

Compute hash of data.
source§

impl DigestVerifier<XofDigest<CoreWrapper<Shake256Core>, UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>, Signature> for VerifyingKey

source§

fn verify_digest( &self, digest: Shake256U64, signature: &Signature, ) -> Result<(), SignatureError>

Verify the signature against the given [Digest] output.
source§

impl<T, OutputSize> FixedOutput for XofDigest<T, OutputSize>
where T: ExtendableOutput, OutputSize: ArrayLength<u8> + 'static,

source§

fn finalize_into(self, out: &mut Output<Self>)

Consume value and write result into provided array.
§

fn finalize_fixed(self) -> GenericArray<u8, Self::OutputSize>

Retrieve result and consume the hasher instance.
source§

impl<T, OutputSize> FixedOutputReset for XofDigest<T, OutputSize>
where T: ExtendableOutput + Default, OutputSize: ArrayLength<u8> + 'static,

source§

fn finalize_into_reset(&mut self, out: &mut Output<Self>)

Write result into provided array and reset the hasher state.
§

fn finalize_fixed_reset(&mut self) -> GenericArray<u8, Self::OutputSize>

Retrieve result and reset the hasher state.
source§

impl<T, OutputSize> OutputSizeUser for XofDigest<T, OutputSize>
where T: ExtendableOutput, OutputSize: ArrayLength<u8> + 'static,

source§

type OutputSize = OutputSize

Size of the output in bytes.
§

fn output_size() -> usize

Return output size in bytes.
source§

impl<T, OutputSize> Reset for XofDigest<T, OutputSize>
where T: ExtendableOutput + Default, OutputSize: ArrayLength<u8> + 'static,

source§

fn reset(&mut self)

Reset state to its initial value.
source§

impl<T, OutputSize> Update for XofDigest<T, OutputSize>
where T: ExtendableOutput + Update, OutputSize: ArrayLength<u8> + 'static,

source§

fn update(&mut self, data: &[u8])

Update state using the provided data.
§

fn chain(self, data: impl AsRef<[u8]>) -> Self
where Self: Sized,

Digest input data in a chained manner.

Auto Trait Implementations§

§

impl<T, OutputSize> Freeze for XofDigest<T, OutputSize>
where T: Freeze,

§

impl<T, OutputSize> RefUnwindSafe for XofDigest<T, OutputSize>
where T: RefUnwindSafe, OutputSize: RefUnwindSafe,

§

impl<T, OutputSize> Send for XofDigest<T, OutputSize>
where T: Send, OutputSize: Send,

§

impl<T, OutputSize> Sync for XofDigest<T, OutputSize>
where T: Sync, OutputSize: Sync,

§

impl<T, OutputSize> Unpin for XofDigest<T, OutputSize>
where T: Unpin, OutputSize: Unpin,

§

impl<T, OutputSize> UnwindSafe for XofDigest<T, OutputSize>
where T: UnwindSafe, OutputSize: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

source§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.