Skip to content

Commit

Permalink
Test that DST works
Browse files Browse the repository at this point in the history
  • Loading branch information
¨Jeff committed Apr 18, 2023
1 parent 05b86ad commit 361b2fa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ff/src/fields/field_hashers/expander/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const LONG_DST_PREFIX: [u8; 17] = [
];


pub(super) struct DST(pub arrayvec::ArrayVec<u8,MAX_DST_LENGTH>);
pub(super) struct DST(arrayvec::ArrayVec<u8,MAX_DST_LENGTH>);

impl DST {
pub fn new_fixed<H: FixedOutput+Default>(dst: &[u8]) -> DST {
Expand Down Expand Up @@ -91,7 +91,8 @@ impl<H: ExtendableOutput + Clone + Default> Expander for ExpanderXof<H> {
let lib_str = (n as u16).to_be_bytes();
xofer.update(&lib_str);

self.update_dst_prime(&mut xofer);
DST::new_xof::<H>(self.dst.as_ref(), self.k).update(&mut xofer);
// self.update_dst_prime(&mut xofer);
xofer.finalize_boxed(n).to_vec()
}
}
Expand Down

0 comments on commit 361b2fa

Please sign in to comment.