Skip to content

Commit

Permalink
Oops not sure why these never ran locally.
Browse files Browse the repository at this point in the history
  • Loading branch information
¨Jeff committed Sep 19, 2023
1 parent 34a7211 commit 204b3b8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ff/src/fields/field_hashers/expander/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ impl DST {
ArrayVec::try_from(long.finalize_fixed().as_ref()).unwrap()
} else {
ArrayVec::try_from(dst).unwrap()
};
};
DST(array)
}

Expand Down
12 changes: 7 additions & 5 deletions ff/src/fields/field_hashers/expander/tests.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@

use libtest_mimic::{run, Arguments, Failed, Trial};

use sha2::{Sha256, Sha384, Sha512};
use sha3::{Shake128, Shake256};
use std::{
fs::{read_dir, File},
io::BufReader,
marker::PhantomData,
};

use super::{Expander, ExpanderXmd, ExpanderXof};
Expand Down Expand Up @@ -99,29 +101,29 @@ fn get_expander(id: ExpID, _dst: &[u8], k: usize) -> Box<dyn Expander> {
match id {
ExpID::XMD(h) => match h {
HashID::SHA256 => Box::new(ExpanderXmd {
hasher: Sha256::default(),
hasher: PhantomData::<Sha256>,
block_size: 64,
dst,
}),
HashID::SHA384 => Box::new(ExpanderXmd {
hasher: Sha384::default(),
hasher: PhantomData::<Sha384>,
block_size: 128,
dst,
}),
HashID::SHA512 => Box::new(ExpanderXmd {
hasher: Sha512::default(),
hasher: PhantomData::<Sha512>,
block_size: 128,
dst,
}),
},
ExpID::XOF(x) => match x {
XofID::SHAKE128 => Box::new(ExpanderXof {
xofer: Shake128::default(),
xofer: PhantomData::<Shake128>,
k,
dst,
}),
XofID::SHAKE256 => Box::new(ExpanderXof {
xofer: Shake256::default(),
xofer: PhantomData::<Shake256>,
k,
dst,
}),
Expand Down

0 comments on commit 204b3b8

Please sign in to comment.