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<DIGEST32_BYTES>
pub fn hash(bytes: &[u8]) -> Blake3Digest<DIGEST32_BYTES>
Returns a hash of the provided sequence of bytes.
sourcepub fn merge(
values: &[Blake3Digest<DIGEST32_BYTES>; 2],
) -> Blake3Digest<DIGEST32_BYTES>
pub fn merge( values: &[Blake3Digest<DIGEST32_BYTES>; 2], ) -> Blake3Digest<DIGEST32_BYTES>
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<DIGEST32_BYTES>where
E: FieldElement<BaseField = Felt>,
pub fn hash_elements<E>(elements: &[E]) -> Blake3Digest<DIGEST32_BYTES>where
E: FieldElement<BaseField = Felt>,
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.6.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]) -> Self::Digestwhere
E: FieldElement<BaseField = Self::BaseField>,
fn hash_elements<E>(elements: &[E]) -> Self::Digestwhere
E: FieldElement<BaseField = Self::BaseField>,
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§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
)