-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add keccak in stdlib * add simple keccak example * use assert * update to latest aztec_backend * update barretenberg to e66f1ef38c3c87c223456d8a77878c2bd3d346eb * change sha256 to keccak256 * update flake.lock * update commit * update cargo.lock --------- Co-authored-by: Kevaundray Wedderburn <kevtheappdev@gmail.com>
- Loading branch information
1 parent
36f5b8e
commit 260d87d
Showing
8 changed files
with
89 additions
and
13 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[package] | ||
authors = [""] | ||
compiler_version = "0.1" | ||
|
||
[dependencies] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
x = 0xbd | ||
result = [ | ||
0x5a, | ||
0x50, | ||
0x2f, | ||
0x9f, | ||
0xca, | ||
0x46, | ||
0x7b, | ||
0x26, | ||
0x6d, | ||
0x5b, | ||
0x78, | ||
0x33, | ||
0x65, | ||
0x19, | ||
0x37, | ||
0xe8, | ||
0x05, | ||
0x27, | ||
0x0c, | ||
0xa3, | ||
0xf3, | ||
0xaf, | ||
0x1c, | ||
0x0d, | ||
0xd2, | ||
0x46, | ||
0x2d, | ||
0xca, | ||
0x4b, | ||
0x3b, | ||
0x1a, | ||
0xbf, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Keccak256 example | ||
// | ||
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::keccak256([x as u8]); | ||
assert(digest == result); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters