Advertisement
Guest User

Untitled

a guest
Jul 21st, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. import "hashes/sha256/256bitPadded.code" as sha256
  2. import "utils/pack/unpack128.code" as unpack128
  3. import "utils/pack/pack128.code" as pack128
  4.  
  5. def main(private field a, private field b) -> (field[2]):
  6. field[128] a128 = unpack128(a)
  7. field[128] b128 = unpack128(b)
  8. h = sha256([...a128, ...b128])
  9. return [pack128(h[0..128]), pack128(h[128..256])]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement