Struct diem_crypto::compat::Sha3_256
source · pub struct Sha3_256(_);
Expand description
A wrapper for [tiny_keccak::Sha3::v256
] that
implements RustCrypto [digest
] traits [BlockInput
], [Update
], [Reset
],
and [FixedOutput
]. Consequently, this wrapper can be used in RustCrypto
APIs that require a hash function (usually something that impls [Digest
]).
Trait Implementations§
source§impl FixedOutput for Sha3_256
impl FixedOutput for Sha3_256
§type OutputSize = UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>
type OutputSize = UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>
Output size for fixed output digest
source§fn finalize_into(self, out: &mut GenericArray<u8, Self::OutputSize>)
fn finalize_into(self, out: &mut GenericArray<u8, Self::OutputSize>)
Write result into provided array and consume the hasher instance.
source§fn finalize_into_reset(&mut self, out: &mut GenericArray<u8, Self::OutputSize>)
fn finalize_into_reset(&mut self, out: &mut GenericArray<u8, Self::OutputSize>)
Write result into provided array and reset the hasher instance.
§fn finalize_fixed(self) -> GenericArray<u8, Self::OutputSize>where
Self: Sized,
fn finalize_fixed(self) -> GenericArray<u8, Self::OutputSize>where Self: Sized,
Retrieve result and consume the hasher instance.
§fn finalize_fixed_reset(&mut self) -> GenericArray<u8, Self::OutputSize>
fn finalize_fixed_reset(&mut self) -> GenericArray<u8, Self::OutputSize>
Retrieve result and reset the hasher instance.
Auto Trait Implementations§
impl RefUnwindSafe for Sha3_256
impl Send for Sha3_256
impl Sync for Sha3_256
impl Unpin for Sha3_256
impl UnwindSafe for Sha3_256
Blanket Implementations§
§impl<D> Digest for Dwhere
D: Update + FixedOutput + Reset + Clone + Default,
impl<D> Digest for Dwhere D: Update + FixedOutput + Reset + Clone + Default,
§type OutputSize = <D as FixedOutput>::OutputSize
type OutputSize = <D as FixedOutput>::OutputSize
Output size for
Digest
§fn finalize(self) -> GenericArray<u8, <D as Digest>::OutputSize>
fn finalize(self) -> GenericArray<u8, <D as Digest>::OutputSize>
Retrieve result and consume hasher instance.
§fn finalize_reset(&mut self) -> GenericArray<u8, <D as Digest>::OutputSize>
fn finalize_reset(&mut self) -> GenericArray<u8, <D as Digest>::OutputSize>
Retrieve result and reset hasher instance. Read more
§fn output_size() -> usize
fn output_size() -> usize
Get output size of the hasher