Skip to content
/ blake3 Public

JavaScript implementation of BLAKE3 extracted from the reference implementation and compiled to WebAssembly

Notifications You must be signed in to change notification settings

coins/blake3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ae7421e · Dec 2, 2023

History

2 Commits
Nov 30, 2023
Nov 30, 2023
Nov 30, 2023
Dec 2, 2023

Repository files navigation

BLAKE3 WASM

BLAKE3 implementation extracted from the reference implementation and compiled to WebAssembly.

Usage

import {blake3} from 'https://bitvm.github.io/blake3/blake3.js'

const preimage = new Uint8Array([97, 98, 99])    // Our preimage is "abc"
const digest = blake3(preimage)

console.log(digest)

Development

The following command compiles the sources to wasm:

clang src/blake3.cpp -O2 --no-standard-libraries -mbulk-memory --target=wasm32 -Wl,--no-entry -o blake3.wasm

About

JavaScript implementation of BLAKE3 extracted from the reference implementation and compiled to WebAssembly

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published