mirror of
https://github.com/logos-messaging/go-zerokit-rln-apple.git
synced 2026-01-04 06:13:07 +00:00
Fix c wrapper
This commit is contained in:
parent
f79c87b064
commit
68b4162e8f
@ -159,14 +159,13 @@ func (r *RLN) GenerateRLNProof(input []byte) ([]byte, error) {
|
|||||||
return C.GoBytes(unsafe.Pointer(out.ptr), C.int(out.len)), nil
|
return C.GoBytes(unsafe.Pointer(out.ptr), C.int(out.len)), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *RLN) GenerateRLNProofWithWitness(input []byte, witness []byte) ([]byte, error) {
|
func (r *RLN) GenerateRLNProofWithWitness(input []byte) ([]byte, error) {
|
||||||
inputBuffer := toCBufferPtr(input)
|
inputBuffer := toCBufferPtr(input)
|
||||||
witnessBuffer := toCBufferPtr(witness)
|
|
||||||
|
|
||||||
var output []byte
|
var output []byte
|
||||||
out := toBuffer(output)
|
out := toBuffer(output)
|
||||||
|
|
||||||
if !bool(C.generate_rln_proof_with_witness(r.ptr, inputBuffer, witnessBuffer, &out)) {
|
if !bool(C.generate_rln_proof_with_witness(r.ptr, inputBuffer, &out)) {
|
||||||
return nil, errors.New("could not generate the proof with witness")
|
return nil, errors.New("could not generate the proof with witness")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user