Struct keccak_asm::Keccak256

source ·
pub struct Keccak256 { /* private fields */ }
Expand description

Keccak-256 hasher state.

Trait Implementations§

source§

impl AlgorithmName for Keccak256

source§

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

Write algorithm name into f.
source§

impl BlockSizeUser for Keccak256

source§

type BlockSize = UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B1>, B0>, B0>, B0>

Size of the block in bytes.
source§

fn block_size() -> usize

Return block size in bytes.
source§

impl BufferKindUser for Keccak256

source§

type BufferKind = Eager

Block buffer kind over which type operates.
source§

impl Clone for Keccak256

source§

fn clone(&self) -> Keccak256

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 Debug for Keccak256

source§

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

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

impl Default for Keccak256

source§

fn default() -> Self

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

impl FixedOutput for Keccak256

source§

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

Consume value and write result into provided array.
source§

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

Retrieve result and consume the hasher instance.
source§

impl FixedOutputReset for Keccak256

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

Retrieve result and reset the hasher state.
source§

impl OutputSizeUser for Keccak256

source§

type OutputSize = UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>

Size of the output in bytes.
source§

fn output_size() -> usize

Return output size in bytes.
source§

impl Reset for Keccak256

source§

fn reset(&mut self)

Reset state to its initial value.
source§

impl Update for Keccak256

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 HashMarker for Keccak256

Auto Trait Implementations§

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, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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) -> GenericArray<u8, <D as OutputSizeUser>::OutputSize>

Retrieve result and consume hasher instance.
source§

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

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

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

Retrieve result and reset hasher instance.
source§

fn finalize_into_reset( &mut self, out: &mut GenericArray<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]>, ) -> GenericArray<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.