(circuitFilename string, witness []byte, configId uint64)
| 221 | } |
| 222 | |
| 223 | func ProveCircuitFile(circuitFilename string, witness []byte, configId uint64) []byte { |
| 224 | initCompilePtr() |
| 225 | bytesFn := []byte(circuitFilename) |
| 226 | cf := C.ByteArray{data: (*C.uint8_t)(C.CBytes(bytesFn)), length: C.uint64_t(len(bytesFn))} |
| 227 | defer C.free(unsafe.Pointer(cf.data)) |
| 228 | wi := C.ByteArray{data: (*C.uint8_t)(C.CBytes(witness)), length: C.uint64_t(len(witness))} |
| 229 | defer C.free(unsafe.Pointer(wi.data)) |
| 230 | proof := C.prove_circuit_file(proveCircuitFilePtr, cf, wi, C.uint64_t(configId)) |
| 231 | defer C.free(unsafe.Pointer(proof.data)) |
| 232 | return goBytes(proof.data, proof.length) |
| 233 | } |
| 234 | |
| 235 | func VerifyCircuitFile(circuitFilename string, witness []byte, proof []byte, configId uint64) bool { |
| 236 | initCompilePtr() |
no test coverage detected