Closed hughe closed 7 years ago
I just updated this PR to include 5538ac1 which allows it to compile on Linux (Centos 7) as well as my Mac.
Unfortunately, Go needs to know all of the pointers that have been passed to C land so that it can keep them alive. Casting them to a uintptr makes them invisible to the GC, making this unsafe to do.
In benchmarks
cgoPointerCheck
was taking about the same time ascgocall EVP_DigestUpdate
and makingSHA256Hash
run about 30% slower than the Go stdlib implementation of SHA256 in Go 1.6. With this change it runs about 60% faster.