Skip to content

Commit

Permalink
feat: use XofReader instead of io::Read for no_std compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
ashutoshvarma committed Jan 10, 2023
1 parent 2dee78c commit f63812b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/commitments.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use super::group::{GroupElement, VartimeMultiscalarMul, GROUP_BASEPOINT_COMPRESSED};
use super::scalar::Scalar;
use digest::XofReader;
use digest::{ExtendableOutput, Input};
use sha3::Shake256;
use std::io::Read;

#[derive(Debug)]
pub struct MultiCommitGens {
Expand All @@ -21,7 +21,7 @@ impl MultiCommitGens {
let mut gens: Vec<GroupElement> = Vec::new();
let mut uniform_bytes = [0u8; 64];
for _ in 0..n + 1 {
reader.read_exact(&mut uniform_bytes).unwrap();
reader.read(&mut uniform_bytes);
gens.push(GroupElement::from_uniform_bytes(&uniform_bytes));
}

Expand Down

0 comments on commit f63812b

Please sign in to comment.