Skip to content

Latest commit

 

History

History
23 lines (19 loc) · 559 Bytes

File metadata and controls

23 lines (19 loc) · 559 Bytes

hashtree-z

Zig binding for hashtree

Quickstart

  • zig fetch --save=hashtree git+https://github.com/chainsafe/hashtree-z
  • In build.zig:
const hashtree = b.dependency("hashtree", .{});
const hashtree_mod = hashtree.module("hashtree");
const hashtree_lib = hashtree.artifact("hashtree");
  • Module usage:
const hashtree = @import("hashtree");

const chunks: [2][32]u8 = [_][32]u8{[_]u8{0xAB} ** 32} ** 2;
var out: [1][32]u8 = undefined;
try hashtree.hash(&out, &chunks);

License

MIT