Struct miden_objects::crypto::hash::blake::Blake3_160
source · pub struct Blake3_160;Expand description
160-bit output blake3 hasher.
Implementations§
source§impl Blake3_160
impl Blake3_160
sourcepub fn hash(
bytes: &[u8]
) -> Blake3Digest<miden_crypto::::hash::blake::{impl#17}::hash::{constant#0}>
pub fn hash( bytes: &[u8] ) -> Blake3Digest<miden_crypto::::hash::blake::{impl#17}::hash::{constant#0}>
Returns a hash of the provided sequence of bytes.
sourcepub fn merge(
values: &[Blake3Digest<miden_crypto::::hash::blake::{impl#17}::merge::{constant#1}>; 2]
) -> Blake3Digest<miden_crypto::::hash::blake::{impl#17}::merge::{constant#2}>
pub fn merge( values: &[Blake3Digest<miden_crypto::::hash::blake::{impl#17}::merge::{constant#1}>; 2] ) -> Blake3Digest<miden_crypto::::hash::blake::{impl#17}::merge::{constant#2}>
Returns a hash of two digests. This method is intended for use in construction of Merkle trees and verification of Merkle paths.
sourcepub fn hash_elements<E>(
elements: &[E]
) -> Blake3Digest<miden_crypto::::hash::blake::{impl#17}::hash_elements::{constant#0}>where
E: FieldElement<BaseField = BaseElement>,
pub fn hash_elements<E>(
elements: &[E]
) -> Blake3Digest<miden_crypto::::hash::blake::{impl#17}::hash_elements::{constant#0}>where
E: FieldElement<BaseField = BaseElement>,
Returns a hash of the provided field elements.
Trait Implementations§
source§impl Clone for Blake3_160
impl Clone for Blake3_160
source§fn clone(&self) -> Blake3_160
fn clone(&self) -> Blake3_160
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for Blake3_160
impl Debug for Blake3_160
source§impl ElementHasher for Blake3_160
impl ElementHasher for Blake3_160
§type BaseField = BaseElement
type BaseField = BaseElement
Specifies a base field for elements which can be hashed with this hasher.
source§fn hash_elements<E>(elements: &[E]) -> <Blake3_160 as Hasher>::Digest
fn hash_elements<E>(elements: &[E]) -> <Blake3_160 as Hasher>::Digest
Returns a hash of the provided field elements.
source§impl Hasher for Blake3_160
impl Hasher for Blake3_160
source§const COLLISION_RESISTANCE: u32 = 80u32
const COLLISION_RESISTANCE: u32 = 80u32
Blake3 collision resistance is 80-bits for 20-bytes output.
§type Digest = Blake3Digest<20>
type Digest = Blake3Digest<20>
Specifies a digest type returned by this hasher.
source§fn hash(bytes: &[u8]) -> <Blake3_160 as Hasher>::Digest
fn hash(bytes: &[u8]) -> <Blake3_160 as Hasher>::Digest
Returns a hash of the provided sequence of bytes.
source§fn merge(
values: &[<Blake3_160 as Hasher>::Digest; 2]
) -> <Blake3_160 as Hasher>::Digest
fn merge( values: &[<Blake3_160 as Hasher>::Digest; 2] ) -> <Blake3_160 as Hasher>::Digest
Returns a hash of two digests. This method is intended for use in construction of
Merkle trees.
source§fn merge_with_int(
seed: <Blake3_160 as Hasher>::Digest,
value: u64
) -> <Blake3_160 as Hasher>::Digest
fn merge_with_int( seed: <Blake3_160 as Hasher>::Digest, value: u64 ) -> <Blake3_160 as Hasher>::Digest
Returns hash(
seed || value). This method is intended for use in PRNG and PoW contexts.source§impl PartialEq for Blake3_160
impl PartialEq for Blake3_160
source§fn eq(&self, other: &Blake3_160) -> bool
fn eq(&self, other: &Blake3_160) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Copy for Blake3_160
impl Eq for Blake3_160
impl StructuralPartialEq for Blake3_160
Auto Trait Implementations§
impl Freeze for Blake3_160
impl RefUnwindSafe for Blake3_160
impl Send for Blake3_160
impl Sync for Blake3_160
impl Unpin for Blake3_160
impl UnwindSafe for Blake3_160
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more