gblake3

BLAKE3 bindings for gleam. Supports both javascript and erlang targets. Erlang bindings through b3 and javascript through blake3 wasm bindings.

Package VersionHex Docs

gleam add gblake3@1
import gblake3

pub fn main() -> Nil {
  "test"
  |> bit_array.from_string
  |> gblake3.hash
  |> bit_array.base64_url_encode(False)
  |> should.equal("SHjKBCXHOfpCf37aIP6EX2suRrpf4qFN9bHjL1BgMhU")
}

Development

gleam test  # Run erlang tests
gleam test --target javascript # Run javascript tests

Javascript binding development

Javascript bindings are found in the typescript directory. Help building new ffi bindings can be found in the README there.

Further documentation can be found at https://hexdocs.pm/gblake3.