Skip to content

Commit 7889a71

Browse files
committed
fix: encode length in big-endian format matching I2OSP.
1 parent eab3147 commit 7889a71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/codec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ where
5656
const WORD_SIZE: usize = 4;
5757

5858
fn length_to_bytes(x: usize) -> [u8; WORD_SIZE] {
59-
(x as u32).to_le_bytes()
59+
(x as u32).to_be_bytes()
6060
}
6161

6262
impl<G, H> Codec for ByteSchnorrCodec<G, H>

0 commit comments

Comments
 (0)