Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
edg-l committed Oct 9, 2023
1 parent ee9f326 commit 8d8fb89
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 78 deletions.
89 changes: 39 additions & 50 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions tests/starknet/contracts/test_keccak.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,7 @@ mod Keccak {
let mut orig_array = input.clone();

let res = keccak::cairo_keccak(ref input, 0x11000010, 4);
assert(@res.low == @0x43ccdbe17ae03b02b308ebe4a23c4cc9, 'Wrong hash low 1');
assert(@res.high == @0xf3cc56e9bd860f83e3e3bc69919b176a, 'Wrong hash high 1');

// With "garbage" at the end (note the `aa`s), we should get the same result.
let res = keccak::cairo_keccak(ref orig_array, 0xaaaaaaaa11000010, 4);
assert(@res.low == @0x43ccdbe17ae03b02b308ebe4a23c4cc9, 'Wrong hash low 2');
assert(@res.high == @0xf3cc56e9bd860f83e3e3bc69919b176a, 'Wrong hash high 2');

1
}
Expand Down
Loading

0 comments on commit 8d8fb89

Please sign in to comment.