Blake3_256

Struct Blake3_256 

Source
pub struct Blake3_256;
Expand description

256-bit output blake3 hasher.

Implementations§

Source§

impl Blake3_256

Source

pub fn hash( bytes: &[u8], ) -> Blake3Digest<miden_crypto::::hash::blake::{impl#12}::hash::{constant#0}>

Returns a hash of the provided sequence of bytes.

Source

pub fn merge( values: &[Blake3Digest<miden_crypto::::hash::blake::{impl#12}::merge::{constant#1}>; 2], ) -> Blake3Digest<miden_crypto::::hash::blake::{impl#12}::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.

Source

pub fn hash_elements<E>( elements: &[E], ) -> Blake3Digest<miden_crypto::::hash::blake::{impl#12}::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

Source§

fn clone(&self) -> Blake3_256

Returns a duplicate 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 Blake3_256

Source§

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

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

impl ElementHasher for Blake3_256

Source§

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
where E: FieldElement<BaseField = <Blake3_256 as ElementHasher>::BaseField>,

Returns a hash of the provided field elements.
Source§

impl Hasher for Blake3_256

Source§

const COLLISION_RESISTANCE: u32 = 128u32

Blake3 collision resistance is 128-bits for 32-bytes output.

Source§

type Digest = Blake3Digest<32>

Specifies a digest type returned by this hasher.
Source§

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

Returns a hash of two digests. This method is intended for use in construction of Merkle trees.
Source§

fn merge_many( values: &[<Blake3_256 as Hasher>::Digest], ) -> <Blake3_256 as Hasher>::Digest

Returns a hash of many digests.
Source§

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

Source§

fn eq(&self, other: &Blake3_256) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for Blake3_256

Source§

impl Eq for Blake3_256

Source§

impl StructuralPartialEq for Blake3_256

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, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V