Skip to main content

XofFixedWrapper

Struct XofFixedWrapper 

Source
pub struct XofFixedWrapper<T: ExtendableOutput, S: ArraySize> { /* private fields */ }
Expand description

Wrapper around ExtendableOutput types adding OutputSizeUser with the given size of S.

Trait Implementations§

Source§

impl<T: ExtendableOutput + BlockSizeUser, S: ArraySize> BlockSizeUser for XofFixedWrapper<T, S>

Source§

type BlockSize = <T as BlockSizeUser>::BlockSize

Size of the block in bytes.
Source§

fn block_size() -> usize

Return block size in bytes.
Source§

impl<T: ExtendableOutput + Clone, S: ArraySize> Clone for XofFixedWrapper<T, S>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: ExtendableOutput + CollisionResistance, S: ArraySize> CollisionResistance for XofFixedWrapper<T, S>

Source§

impl<T: ExtendableOutput + CustomizedInit, S: ArraySize> CustomizedInit for XofFixedWrapper<T, S>

Source§

fn new_customized(customization: &[u8]) -> Self

Create new hasher instance with the given customization string.
Source§

impl<T: ExtendableOutput + Debug, S: ArraySize> Debug for XofFixedWrapper<T, S>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: ExtendableOutput + Default, S: ArraySize> Default for XofFixedWrapper<T, S>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<T: ExtendableOutput, S: ArraySize> ExtendableOutput for XofFixedWrapper<T, S>

Source§

type Reader = <T as ExtendableOutput>::Reader

Reader
Source§

fn finalize_xof(self) -> Self::Reader

Retrieve XOF reader and consume hasher instance.
Source§

fn finalize_xof_into(self, out: &mut [u8])

Finalize XOF and write result into out.
Source§

fn digest_xof(input: impl AsRef<[u8]>, output: &mut [u8])
where Self: Default,

Compute hash of data and write it into output.
Source§

fn finalize_boxed(self, output_size: usize) -> Box<[u8]>

Available on crate feature alloc only.
Retrieve result into a boxed slice of the specified size and consume the hasher. Read more
Source§

impl<T: ExtendableOutputReset, S: ArraySize> ExtendableOutputReset for XofFixedWrapper<T, S>

Source§

fn finalize_xof_reset(&mut self) -> Self::Reader

Retrieve XOF reader and reset hasher instance state.
Source§

fn finalize_xof_reset_into(&mut self, out: &mut [u8])

Finalize XOF, write result into out, and reset the hasher state.
Source§

fn finalize_boxed_reset(&mut self, output_size: usize) -> Box<[u8]>

Available on crate feature alloc only.
Retrieve result into a boxed slice of the specified size and reset the hasher state. Read more
Source§

impl<T: ExtendableOutput + Update, S: ArraySize> FixedOutput for XofFixedWrapper<T, S>

Source§

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

Consume value and write result into provided array.
Source§

fn finalize_fixed(self) -> Output<Self>

Retrieve result and consume the hasher instance.
Source§

impl<T: ExtendableOutputReset, S: ArraySize> FixedOutputReset for XofFixedWrapper<T, S>

Source§

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

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

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

Retrieve result and reset the hasher state.
Source§

impl<T: ExtendableOutput + KeyInit, S: ArraySize> KeyInit for XofFixedWrapper<T, S>

Source§

fn new(key: &Key<Self>) -> Self

Create new value from fixed size key.
Source§

fn new_from_slice(key: &[u8]) -> Result<Self, InvalidLength>

Create new value from variable size key. Read more
Source§

fn generate_key<R>(rng: &mut R) -> Array<u8, Self::KeySize>
where R: CryptoRng,

👎Deprecated since 0.2.0: use the Generate trait impl on Key instead
Available on crate feature rand_core only.
DEPRECATED: generate random key using the provided CryptoRng. Read more
Source§

impl<T: ExtendableOutput + KeySizeUser, S: ArraySize> KeySizeUser for XofFixedWrapper<T, S>

Source§

type KeySize = <T as KeySizeUser>::KeySize

Key size in bytes.
Source§

fn key_size() -> usize

Return key size in bytes.
Source§

impl<T: ExtendableOutput, S: ArraySize> OutputSizeUser for XofFixedWrapper<T, S>

Source§

type OutputSize = S

Size of the output in bytes.
Source§

fn output_size() -> usize

Return output size in bytes.
Source§

impl<T: ExtendableOutput + Reset, S: ArraySize> Reset for XofFixedWrapper<T, S>

Source§

fn reset(&mut self)

Reset state to its initial value.
Source§

impl<T: ExtendableOutput + SerializableState, S: ArraySize> SerializableState for XofFixedWrapper<T, S>

Source§

type SerializedStateSize = <T as SerializableState>::SerializedStateSize

Size of serialized internal state.
Source§

fn serialize(&self) -> SerializedState<Self>

Serialize and return internal state.
Source§

fn deserialize( serialized_state: &SerializedState<Self>, ) -> Result<Self, DeserializeStateError>

Create an object from serialized internal state. Read more
Source§

impl<T: ExtendableOutput + Update, S: ArraySize> Update for XofFixedWrapper<T, S>

Source§

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

Update state using the provided data.
Source§

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

Digest input data in a chained manner.
Source§

impl<T: ExtendableOutput + HashMarker, S: ArraySize> HashMarker for XofFixedWrapper<T, S>

Source§

impl<T: ExtendableOutput + MacMarker, S: ArraySize> MacMarker for XofFixedWrapper<T, S>

Available on crate feature mac only.
Source§

impl<T: ExtendableOutput + ZeroizeOnDrop, S: ArraySize> ZeroizeOnDrop for XofFixedWrapper<T, S>

Available on crate feature zeroize only.

Auto Trait Implementations§

§

impl<T, S> Freeze for XofFixedWrapper<T, S>
where T: Freeze,

§

impl<T, S> RefUnwindSafe for XofFixedWrapper<T, S>

§

impl<T, S> Send for XofFixedWrapper<T, S>
where T: Send, S: Send,

§

impl<T, S> Sync for XofFixedWrapper<T, S>
where T: Sync, S: Sync,

§

impl<T, S> Unpin for XofFixedWrapper<T, S>
where T: Unpin, S: Unpin,

§

impl<T, S> UnsafeUnpin for XofFixedWrapper<T, S>
where T: UnsafeUnpin,

§

impl<T, S> UnwindSafe for XofFixedWrapper<T, S>
where T: UnwindSafe, S: 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<D> Digest for D

Source§

fn new() -> D

Create new hasher instance.
Source§

fn new_with_prefix(data: impl AsRef<[u8]>) -> D
where D: Default,

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]>) -> D

Process input data in a chained manner.
Source§

fn finalize(self) -> Array<u8, <D as OutputSizeUser>::OutputSize>

Retrieve result and consume hasher instance.
Source§

fn finalize_into(self, out: &mut Array<u8, <D as OutputSizeUser>::OutputSize>)

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

fn finalize_reset(&mut self) -> Array<u8, <D as OutputSizeUser>::OutputSize>

Retrieve result and reset hasher instance.
Source§

fn finalize_into_reset( &mut self, out: &mut Array<u8, <D as OutputSizeUser>::OutputSize>, )

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

fn reset(&mut self)
where D: Reset,

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]>, ) -> Array<u8, <D as OutputSizeUser>::OutputSize>

Compute hash of data.
Source§

impl<D> DynDigest for D
where D: Update + FixedOutputReset + Reset + Clone + 'static,

Source§

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

Digest input data. Read more
Source§

fn finalize_reset(&mut self) -> Box<[u8]>

Available on crate feature alloc only.
Retrieve result and reset hasher instance
Source§

fn finalize(self: Box<D>) -> Box<[u8]>

Available on crate feature alloc only.
Retrieve result and consume boxed hasher instance
Source§

fn finalize_into(self, buf: &mut [u8]) -> Result<(), InvalidBufferSize>

Write result into provided array and consume the hasher instance. Read more
Source§

fn finalize_into_reset( &mut self, buf: &mut [u8], ) -> Result<(), InvalidBufferSize>

Write result into provided array and reset the hasher instance. Read more
Source§

fn reset(&mut self)

Reset hasher instance to its initial state.
Source§

fn output_size(&self) -> usize

Get output size of the hasher
Source§

fn box_clone(&self) -> Box<dyn DynDigest>

Available on crate feature alloc only.
Clone hasher state into a boxed trait object
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> Mac for T

Source§

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

Available on crate feature mac only.
Update state using the provided data.
Source§

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

Available on crate feature mac only.
Process input data in a chained manner.
Source§

fn finalize(self) -> CtOutput<T>

Available on crate feature mac only.
Obtain the result of a Mac computation as a CtOutput and consume Mac instance.
Source§

fn finalize_reset(&mut self) -> CtOutput<T>

Available on crate feature mac only.
Obtain the result of a Mac computation as a CtOutput and reset Mac instance.
Source§

fn reset(&mut self)
where T: Reset,

Available on crate feature mac only.
Reset MAC instance to its initial state.
Source§

fn verify( self, tag: &Array<u8, <T as OutputSizeUser>::OutputSize>, ) -> Result<(), MacError>

Available on crate feature mac only.
Check if tag/code value is correct for the processed input. Read more
Source§

fn verify_reset( &mut self, tag: &Array<u8, <T as OutputSizeUser>::OutputSize>, ) -> Result<(), MacError>

Available on crate feature mac only.
Check if tag/code value is correct for the processed input and reset Mac instance. Read more
Source§

fn verify_slice(self, tag: &[u8]) -> Result<(), MacError>

Available on crate feature mac only.
Check truncated tag correctness using all bytes of calculated tag. Read more
Source§

fn verify_slice_reset(&mut self, tag: &[u8]) -> Result<(), MacError>

Available on crate feature mac only.
Check truncated tag correctness using all bytes of calculated tag and reset Mac instance. Read more
Source§

fn verify_truncated_left(self, tag: &[u8]) -> Result<(), MacError>

Available on crate feature mac only.
Check truncated tag correctness using left side bytes (i.e. tag[..n]) of calculated tag. Read more
Source§

fn verify_truncated_right(self, tag: &[u8]) -> Result<(), MacError>

Available on crate feature mac only.
Check truncated tag correctness using right side bytes (i.e. tag[n..]) of calculated tag. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> SmallBlockSizeUser for T

Source§

type _BlockSize = <T as BlockSizeUser>::BlockSize

Available on crate feature block-api only.
Helper associated type equal to <Self as BlockSizeUser>::BlockSize.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.