x16rs-sys
Official Rust FFI bindings for the Hacash X16RS hashing algorithm (C implementation).
use x16rs_hash;
let input = ;
let digest = x16rs_hash;
assert_ne!;
Changelog
0.1.2
- Fix UB: declare FFI output pointer as
*mut u8(was*const u8). Writing through*constis undefined behavior; under optimization LLVM may assume the output buffer is unchanged and return all zeros. - Fix alignment: copy input/output via
memcpyin C instead of casting possibly unaligneduint8_t*touint32_t*. - Align C API types with
uint8_t*and add regression tests.