starting to fix bindings

This commit is contained in:
decanus 2021-09-13 18:57:35 +02:00
parent 5d5f2e47cb
commit 8d6a11f547
No known key found for this signature in database
GPG Key ID: 3730AAF5D6589867
2 changed files with 9 additions and 1 deletions

View File

@ -20,7 +20,7 @@ func (r *RLN) Hash(input []byte) []byte {
C.hash(r.ptr, &in, &in.len, out)
return []byte{}
return C.GoBytes(unsafe.Pointer(out.ptr), C.int(out.len))
}
func (r *RLN) CircuitFromParams(depth int, parameters []byte) bool {

8
rln/rln_test.go Normal file
View File

@ -0,0 +1,8 @@
package rln
import "testing"
func TestHash(t *testing.T) {
rln := &RLN{}
rln.Hash([]byte{1, 2, 3})
}