Enum miden_air::HashFunction
source · #[repr(u8)]pub enum HashFunction {
Blake3_192 = 0,
Blake3_256 = 1,
Rpo256 = 2,
}
Expand description
A hash function used during STARK proof generation.
Variants§
Blake3_192 = 0
BLAKE3 hash function with 192-bit output.
Blake3_256 = 1
BLAKE3 hash function with 256-bit output.
Rpo256 = 2
RPO hash function with 256-bit output.
Implementations§
source§impl HashFunction
impl HashFunction
sourcepub const fn collision_resistance(&self) -> u32
pub const fn collision_resistance(&self) -> u32
Returns the collision resistance level (in bits) of this hash function.
Trait Implementations§
source§impl Clone for HashFunction
impl Clone for HashFunction
source§fn clone(&self) -> HashFunction
fn clone(&self) -> HashFunction
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 HashFunction
impl Debug for HashFunction
source§impl Default for HashFunction
impl Default for HashFunction
source§impl Deserializable for HashFunction
impl Deserializable for HashFunction
source§fn read_from<R: ByteReader>(
source: &mut R
) -> Result<Self, DeserializationError>
fn read_from<R: ByteReader>( source: &mut R ) -> Result<Self, DeserializationError>
Reads a sequence of bytes from the provided
source
, attempts to deserialize these bytes
into Self
, and returns the result. Read moresource§fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>
fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>
source§impl Hash for HashFunction
impl Hash for HashFunction
source§impl PartialEq for HashFunction
impl PartialEq for HashFunction
source§fn eq(&self, other: &HashFunction) -> bool
fn eq(&self, other: &HashFunction) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serializable for HashFunction
impl Serializable for HashFunction
source§fn write_into<W: ByteWriter>(&self, target: &mut W)
fn write_into<W: ByteWriter>(&self, target: &mut W)
Serializes
self
into bytes and writes these bytes into the target
.source§fn get_size_hint(&self) -> usize
fn get_size_hint(&self) -> usize
Returns an estimate of how many bytes are needed to represent self. Read more
source§impl TryFrom<u8> for HashFunction
impl TryFrom<u8> for HashFunction
impl Copy for HashFunction
impl Eq for HashFunction
impl StructuralPartialEq for HashFunction
Auto Trait Implementations§
impl Freeze for HashFunction
impl RefUnwindSafe for HashFunction
impl Send for HashFunction
impl Sync for HashFunction
impl Unpin for HashFunction
impl UnwindSafe for HashFunction
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