Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench committed Sep 24, 2024
1 parent 9e66e9b commit 16fbfd4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions noir_stdlib/src/hash/sha256.nr
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ pub fn sha256_var<let N: u32>(msg: [u8; N], message_size: u64) -> [u8; 32] {
// We verify the message length was inserted correctly by reversing the byte decomposition.
let len = 8 * message_size;
let mut reconstructed_len: Field = 0;
for i in 0..8 {
reconstructed_len = 256 * reconstructed_len + msg_block[56 + i] as Field;
for i in 56..64 {
reconstructed_len = 256 * reconstructed_len + msg_block[i] as Field;
}
assert_eq(reconstructed_len, len as Field);
}
Expand Down

0 comments on commit 16fbfd4

Please sign in to comment.