-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No C bindings for HighwayTreeHash and SipHash #11
Comments
Hi Vinzent, we were keen on simplifying the headers (already complicated due to conditional compilation and *State classes). How about this approach using a separate header? |
I think that would be the best solution. |
Glad to hear it, thanks :) |
The bindings seem a bit inconsistent:
I'll test the bindings once I get the build working again (#12). |
The C-suffix functions have two disadvantages: they're harder to inline (requires link-time inlining because they're not in the header) and the key parameter is not type-safe (can cause out of bounds accesses - SipHash expects 2 uint64, the others 4). That's why we'd like to keep the C bindings separate :) Honestly, I don't see much value in SipTreeHash because it's not drop-in compatible with SipHash, nor is it as fast as HighwayHash. Still, we can add their bindings for completeness (plus SipHashC - thanks for pointing that out). Please feel free to re-open if needed :) |
I see. I bound against the non-suffix functions and it worked, probably due to an implicit cast. Looks good to me, except that |
Thanks for looking, sorry about the missing SipHashC. Will add that next week :) |
Done :) |
Great, thanks! |
It used to be possible to bind against these, however this is no longer the case.
The text was updated successfully, but these errors were encountered: