[go: up one dir, main page]

Struct Blake2b

Source
pub struct Blake2b<OutSize>
where OutSize: ArraySize + IsLessOrEqual<U64, Output = True>,
{ /* private fields */ }
Expand description

BLAKE2b generic over output size.

Trait Implementations§

Source§

impl<OutSize> AlgorithmName for Blake2b<OutSize>
where OutSize: ArraySize + IsLessOrEqual<U64, Output = True>,

Source§

fn write_alg_name(f: &mut Formatter<'_>) -> Result<(), Error>

Write algorithm name into f.
Source§

impl<OutSize> BlockSizeUser for Blake2b<OutSize>
where OutSize: ArraySize + IsLessOrEqual<U64, Output = True>,

Source§

type BlockSize = <Blake2bVarCore as BlockSizeUser>::BlockSize

Size of the block in bytes.
Source§

fn block_size() -> usize

Return block size in bytes.
Source§

impl<OutSize> Clone for Blake2b<OutSize>
where OutSize: ArraySize + IsLessOrEqual<U64, Output = True>,

Source§

fn clone(&self) -> Self

Returns a copy 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<OutSize> CoreProxy for Blake2b<OutSize>
where OutSize: ArraySize + IsLessOrEqual<U64, Output = True>,

Source§

type Core = CtOutWrapper<Blake2bVarCore, OutSize>

Wrapped block-level type.
Source§

impl<OutSize> CustomizedInit for Blake2b<OutSize>
where OutSize: ArraySize + IsLessOrEqual<U64, Output = True>,

Source§

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

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

impl<OutSize> Debug for Blake2b<OutSize>
where OutSize: ArraySize + IsLessOrEqual<U64, Output = True>,

Source§

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

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

impl<OutSize> Default for Blake2b<OutSize>
where OutSize: ArraySize + IsLessOrEqual<U64, Output = True>,

Source§

fn default() -> Self

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

impl<OutSize> FixedOutput for Blake2b<OutSize>
where OutSize: ArraySize + IsLessOrEqual<U64, Output = True>,

Source§

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

Consume value and write result into provided array.
Source§

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

Retrieve result and consume the hasher instance.
Source§

impl<OutSize> FixedOutputReset for Blake2b<OutSize>
where OutSize: ArraySize + IsLessOrEqual<U64, Output = True>,

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) -> Array<u8, Self::OutputSize>

Retrieve result and reset the hasher state.
Source§

impl<OutSize> OutputSizeUser for Blake2b<OutSize>
where OutSize: ArraySize + IsLessOrEqual<U64, Output = True>,

Source§

type OutputSize = OutSize

Size of the output in bytes.
Source§

fn output_size() -> usize

Return output size in bytes.
Source§

impl<OutSize> Reset for Blake2b<OutSize>
where OutSize: ArraySize + IsLessOrEqual<U64, Output = True>,

Source§

fn reset(&mut self)

Reset state to its initial value.
Source§

impl<OutSize> Update for Blake2b<OutSize>
where OutSize: ArraySize + IsLessOrEqual<U64, Output = True>,

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<OutSize> HashMarker for Blake2b<OutSize>
where OutSize: ArraySize + IsLessOrEqual<U64, Output = True>,

Auto Trait Implementations§

§

impl<OutSize> Freeze for Blake2b<OutSize>

§

impl<OutSize> RefUnwindSafe for Blake2b<OutSize>
where OutSize: RefUnwindSafe,

§

impl<OutSize> Send for Blake2b<OutSize>
where OutSize: Send,

§

impl<OutSize> Sync for Blake2b<OutSize>
where OutSize: Sync,

§

impl<OutSize> Unpin for Blake2b<OutSize>
where OutSize: Unpin,

§

impl<OutSize> UnwindSafe for Blake2b<OutSize>
where OutSize: 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]>

Retrieve result and reset hasher instance
Source§

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

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>

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> Same for T

Source§

type Output = T

Should always be Self
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.