randombit / botan

Cryptography Toolkit
https://botan.randombit.net
BSD 2-Clause "Simplified" License
2.6k stars 570 forks source link

Better abstraction to test view-style FFI APIs #4372

Closed reneme closed 1 month ago

reneme commented 1 month ago

The previous method required the caller to know the expected size of the to-be-viewed byte buffer before calling the FFI function. Now, the wrapper class takes care of the allocation transparently.

This abstraction will come in handy when building FFI integrations for the upcoming PQC algorithms in the context of #4368.

coveralls commented 1 month ago

Coverage Status

coverage: 91.113% (-0.006%) from 91.119% when pulling 698fe845d08476e86f55d4ede3d1648e2fffa08b on Rohde-Schwarz:refactor/ffi_view_fn_tests into 7e02c5c7bfae04f5c3764f1301945e9aef32d9f0 on randombit:master.