mirror of
https://github.com/apple/swift-crypto
synced 2026-11-24 04:37:48 +00:00
## Motivation Some of our calls to our C library dependencies use either a C shim layer or the use of `bindMemory(to:)`, neither of which are still required. The shims themselves cite that once SR-11087 lands, they are no longer needed. That issue was addressed and has been available in all the Swift versions this package currently supports. We can now remove most of these workarounds that add complexity to the C interop. ## Modifications - Remove uses of `bindMemory(to:)` calls since we can now pass the buffer pointer directly to these C functions now. - Replace use of `BN_mod` (macro, needed shim) with `BN_div` (no shim required). - Replace all other shims with call to corresponding un-shimmed function directly. - Remove shim target entirely from package. ## Result Less hand-rolled code for C interop, reducing complexity for project.