Closed brandsimon closed 10 months ago
@Superhepper Thank you very much. Your ffi code works great and looks clean. I changed the test to persist the handle and drop the old context. If the persistent handle exists, it is cleared before the test.
@ionut-arm @Superhepper I added descriptions and examples.
I don't know if the implementation with
buffer.len().try_into().map_err
andstd::slice::from_raw_parts
is the cleanest solution. Please let me know if you have ideas for cleaner solutions. Regarding the tests, thenew_handle = old_handle + 1
, but I think checking the public part (which includes the public key) is the most relevant test for it.Edit: The test with the new context is needed. Currently it works with the old context, but not with a new one.