1
0
Fork 0
mirror of synced 2025-09-23 12:18:44 +00:00
ZoKrates/stdlib/hashes/sha256/512bit.code
2019-01-31 13:29:16 +01:00

15 lines
No EOL
521 B
Text

import "./IVconstants.code" as IVconstants
import "./shaRoundNoBoolCheck.code" as sha256
// A function that takes 2 field[256] arrays as inputs
// and returns their sha256 compression function as an array of 256 field elements.
// In contrast to full_round.code no padding is being applied
def main(field[256] a, field[256] b) -> (field[256]):
// a and b is NOT checked to be of type bool
IV = IVconstants()
digest = sha256(a, b, IV)
//digest is constraint to be of type bool
return digest