Skip to content

Commit

Permalink
restore build_msg_block
Browse files Browse the repository at this point in the history
  • Loading branch information
guipublic committed Feb 4, 2025
1 parent 89f9a54 commit 1953e1f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/sha256.nr
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,11 @@ unconstrained fn build_msg_block<let N: u32>(
// k is always less
for j in 0..INT_SIZE {
let k = i * INT_SIZE + j;
let msg_byte = msg[msg_start + k];
let msg_byte = if k < block_input {
msg[msg_start + k]
} else {
0
};
msg_item = lshift8(msg_item, 1) + msg_byte as u32;
}
msg_block[i] = msg_item;
Expand Down

0 comments on commit 1953e1f

Please sign in to comment.