Enum winter_prover::HashFunction [−][src]
#[repr(u8)]
pub enum HashFunction {
Blake3_256,
Sha3_256,
}Expand description
Defines a set of available hash function for STARK protocol.
Choice of a hash function has a direct impact on proof generation time, proof size, and proof soundness. In general, sounds of the proof is bounded by the collision resistance of the hash function used by the protocol.
Variants
BLAKE3 hash function with 256 bit output.
SHA3 hash function with 256 bit output.
Implementations
Returns collision resistance of this hash function in bits.
Trait Implementations
pub fn read_from<R>(
source: &mut R
) -> Result<HashFunction, DeserializationError> where
R: ByteReader,
pub fn read_from<R>(
source: &mut R
) -> Result<HashFunction, DeserializationError> where
R: ByteReader,
Reads a hash function enum from the specified source.
fn read_batch_from<R>(
source: &mut R,
num_elements: usize
) -> Result<Vec<Self, Global>, DeserializationError> where
R: ByteReader,
fn read_batch_from<R>(
source: &mut R,
num_elements: usize
) -> Result<Vec<Self, Global>, DeserializationError> where
R: ByteReader,
Reads a sequence of bytes from the provided source, attempts to deserialize these bytes
into a vector with the specified number of Self elements, and returns the result. Read more
Auto Trait Implementations
impl RefUnwindSafe for HashFunction
impl Send for HashFunction
impl Sync for HashFunction
impl Unpin for HashFunction
impl UnwindSafe for HashFunction
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self