pub trait Domain<F: Field, const RATE: usize> {
    type Padding: IntoIterator<Item = F>;

    // Required methods
    fn name() -> String;
    fn initial_capacity_element() -> F;
    fn padding(input_len: usize) -> Self::Padding;
}
Expand description

A domain in which a Poseidon hash function is being used.

Required Associated Types§

source

type Padding: IntoIterator<Item = F>

Iterator that outputs padding field elements.

Required Methods§

source

fn name() -> String

The name of this domain, for debug formatting purposes.

source

fn initial_capacity_element() -> F

The initial capacity element, encoding this domain.

source

fn padding(input_len: usize) -> Self::Padding

Returns the padding to be appended to the input.

Implementors§

source§

impl<F: PrimeField, const RATE: usize, const L: usize> Domain<F, RATE> for ConstantLength<L>

§

type Padding = Take<Repeat<F>>