Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import "hashes/sha256/256bitPadded.code" as sha256
- import "utils/pack/unpack128.code" as unpack128
- import "utils/pack/pack128.code" as pack128
- def main(private field a, private field b) -> (field[2]):
- field[128] a128 = unpack128(a)
- field[128] b128 = unpack128(b)
- h = sha256([...a128, ...b128])
- return [pack128(h[0..128]), pack128(h[128..256])]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement