x16rs-sys 0.1.2

x16rs c binding for rust
Documentation
  • Coverage
  • 33.33%
    1 out of 3 items documented0 out of 1 items with examples
  • Size
  • Source code size: 3.31 MB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 246.45 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 11s Average build duration of successful builds.
  • all releases: 23s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • hacash/x16rs-sys
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • jojoin

x16rs-sys

Official Rust FFI bindings for the Hacash X16RS hashing algorithm (C implementation).

use x16rs_sys::x16rs_hash;

let input = [0u8; 32];
let digest = x16rs_hash(1, &input);
assert_ne!(digest, [0u8; 32]);

Changelog

0.1.2

  • Fix UB: declare FFI output pointer as *mut u8 (was *const u8). Writing through *const is undefined behavior; under optimization LLVM may assume the output buffer is unchanged and return all zeros.
  • Fix alignment: copy input/output via memcpy in C instead of casting possibly unaligned uint8_t* to uint32_t*.
  • Align C API types with uint8_t* and add regression tests.