Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
autquis committed Feb 13, 2024
1 parent 7fc117b commit 1837580
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sponge/merlin/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ impl CryptographicSponge for Transcript {
}

fn squeeze_bytes(&mut self, num_bytes: usize) -> Vec<u8> {
let mut dest = Vec::with_capacity(num_bytes);
let mut dest = vec![0; num_bytes];
self.challenge_bytes(b"", &mut dest);
dest
}

fn squeeze_bits(&mut self, num_bits: usize) -> Vec<bool> {
let num_bytes = (num_bits + 7) / 8;
let mut tmp = Vec::with_capacity(num_bytes);
let mut tmp = vec![0; num_bytes];
self.challenge_bytes(b"", &mut tmp);
let dest = tmp
.iter()
Expand Down

0 comments on commit 1837580

Please sign in to comment.