mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-05-05 09:43:11 +00:00
Pad according to RATE rather than WIDTH (#1299)
This commit is contained in:
parent
49976ea2a9
commit
05006deb44
@ -43,7 +43,7 @@ pub trait Hasher<F: RichField>: Sized + Copy + Debug + Eq + PartialEq {
|
|||||||
fn hash_pad(input: &[F]) -> Self::Hash {
|
fn hash_pad(input: &[F]) -> Self::Hash {
|
||||||
let mut padded_input = input.to_vec();
|
let mut padded_input = input.to_vec();
|
||||||
padded_input.push(F::ONE);
|
padded_input.push(F::ONE);
|
||||||
while (padded_input.len() + 1) % Self::Permutation::WIDTH != 0 {
|
while (padded_input.len() + 1) % Self::Permutation::RATE != 0 {
|
||||||
padded_input.push(F::ZERO);
|
padded_input.push(F::ZERO);
|
||||||
}
|
}
|
||||||
padded_input.push(F::ONE);
|
padded_input.push(F::ONE);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user