mattrglobal / ffi-bbs-signatures

An FFI wrapper around the implementation of BBS+ signatures in Ursa
Apache License 2.0
23 stars 23 forks source link

Update signatures that take ByteBuffer to use struct, instead a pointer #1

Closed tmarkovski closed 4 years ago

tmarkovski commented 4 years ago

It seems that there's no need to pass a pointer to ByteBuffer when going through FFI. The byte arrays can be passed as ByteBuffer directly. The calling runtime will still be responsible for clearing the buffer. This appears to be a cosmetic change, but for .NET specifically, it allows us to avoid using unsafe context anywhere, and just rely on the marshaling logic to handle structs. I've tested this on Mac, Windows and Linux.