Have Transcript::append_message take in AsRef<[u8]>, not &[u8]

Simplifies calling it.
This commit is contained in:
Luke Parker
2022-11-05 18:43:36 -04:00
parent 65df18d285
commit 8de465af87
20 changed files with 59 additions and 59 deletions

View File

@@ -91,9 +91,9 @@ where
{
fn transcript<T: Transcript>(transcript: &mut T, i: usize, commitments: (G0, G1)) {
transcript.domain_separate(b"bits");
transcript.append_message(b"group", &u16::try_from(i).unwrap().to_le_bytes());
transcript.append_message(b"commitment_0", commitments.0.to_bytes().as_ref());
transcript.append_message(b"commitment_1", commitments.1.to_bytes().as_ref());
transcript.append_message(b"group", u16::try_from(i).unwrap().to_le_bytes());
transcript.append_message(b"commitment_0", commitments.0.to_bytes());
transcript.append_message(b"commitment_1", commitments.1.to_bytes());
}
fn ring(pow_2: (G0, G1), commitments: (G0, G1)) -> Vec<(G0, G1)> {