Skip to content

Commit

Permalink
change sha256 to keccak256
Browse files Browse the repository at this point in the history
  • Loading branch information
kevaundray committed May 5, 2023
1 parent 6235fc8 commit fa4d9c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/nargo_cli/tests/test_data/keccak256/src/main.nr
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ use dep::std;
fn main(x: Field, result: [u8; 32]) {
// We use the `as` keyword here to denote the fact that we want to take just the first byte from the x Field
// The padding is taken care of by the program
let digest = std::hash::sha256([x as u8]);
let digest = std::hash::keccak256([x as u8]);
assert(digest == result);
}

0 comments on commit fa4d9c1

Please sign in to comment.