Struct miden_processor::crypto::Blake3_256
source · pub struct Blake3_256;Expand description
256-bit output blake3 hasher.
Implementations§
source§impl Blake3_256
impl Blake3_256
sourcepub fn hash(
bytes: &[u8],
) -> Blake3Digest<miden_crypto::::hash::blake::{impl#11}::hash::{constant#0}>
pub fn hash( bytes: &[u8], ) -> Blake3Digest<miden_crypto::::hash::blake::{impl#11}::hash::{constant#0}>
Returns a hash of the provided sequence of bytes.
sourcepub fn merge(
values: &[Blake3Digest<miden_crypto::::hash::blake::{impl#11}::merge::{constant#1}>; 2],
) -> Blake3Digest<miden_crypto::::hash::blake::{impl#11}::merge::{constant#2}>
pub fn merge( values: &[Blake3Digest<miden_crypto::::hash::blake::{impl#11}::merge::{constant#1}>; 2], ) -> Blake3Digest<miden_crypto::::hash::blake::{impl#11}::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#11}::hash_elements::{constant#0}>where
E: FieldElement<BaseField = BaseElement>,
pub fn hash_elements<E>(
elements: &[E],
) -> Blake3Digest<miden_crypto::::hash::blake::{impl#11}::hash_elements::{constant#0}>where
E: FieldElement<BaseField = BaseElement>,
Returns a hash of the provided field elements.
Trait Implementations§
source§impl Clone for Blake3_256
impl Clone for Blake3_256
source§fn clone(&self) -> Blake3_256
fn clone(&self) -> Blake3_256
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_256
impl Debug for Blake3_256
source§impl ElementHasher for Blake3_256
impl ElementHasher for Blake3_256
source§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_256 as Hasher>::Digest
fn hash_elements<E>(elements: &[E]) -> <Blake3_256 as Hasher>::Digest
Returns a hash of the provided field elements.
source§impl Hasher for Blake3_256
impl Hasher for Blake3_256
source§const COLLISION_RESISTANCE: u32 = 128u32
const COLLISION_RESISTANCE: u32 = 128u32
Blake3 collision resistance is 128-bits for 32-bytes output.
source§type Digest = Blake3Digest<32>
type Digest = Blake3Digest<32>
Specifies a digest type returned by this hasher.
source§fn hash(bytes: &[u8]) -> <Blake3_256 as Hasher>::Digest
fn hash(bytes: &[u8]) -> <Blake3_256 as Hasher>::Digest
Returns a hash of the provided sequence of bytes.
source§fn merge(
values: &[<Blake3_256 as Hasher>::Digest; 2],
) -> <Blake3_256 as Hasher>::Digest
fn merge( values: &[<Blake3_256 as Hasher>::Digest; 2], ) -> <Blake3_256 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_256 as Hasher>::Digest,
value: u64,
) -> <Blake3_256 as Hasher>::Digest
fn merge_with_int( seed: <Blake3_256 as Hasher>::Digest, value: u64, ) -> <Blake3_256 as Hasher>::Digest
Returns hash(
seed || value). This method is intended for use in PRNG and PoW contexts.source§impl PartialEq for Blake3_256
impl PartialEq for Blake3_256
impl Copy for Blake3_256
impl Eq for Blake3_256
impl StructuralPartialEq for Blake3_256
Auto Trait Implementations§
impl Freeze for Blake3_256
impl RefUnwindSafe for Blake3_256
impl Send for Blake3_256
impl Sync for Blake3_256
impl Unpin for Blake3_256
impl UnwindSafe for Blake3_256
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)