1
0
Fork 0
mirror of synced 2025-09-24 04:40:05 +00:00
ZoKrates/zokrates_stdlib/stdlib/utils/pack/u32/pack128.zok
2020-07-03 18:10:33 +02:00

10 lines
No EOL
253 B
Text

#pragma curve bn128
import "EMBED/u32_to_bits" as to_bits
import "../bool/pack128"
def main(u32[4] input) -> (field):
bool[128] bits = [...to_bits(input[0]), ...to_bits(input[1]), ...to_bits(input[2]), ...to_bits(input[3])]
return pack128(bits)