hash_blake3.ts

BLAKE3 cryptographic hashing via @fuzdev/blake3_wasm.

Synchronous and fast. Returns hex-encoded 256-bit (32-byte) digests. WASM initialization starts eagerly on import. Await blake3_ready before first use in browser contexts where the WASM must be fetched asynchronously.

Importing this module costs the WASM binary. Code that only validates the shape of a hash wants Blake3Hash from hash_schemas.ts, which is WASM-free.

view source

Declarations
#

2 declarations

blake3_ready
#

hash_blake3.ts view source

Promise<void> import {blake3_ready} from '@fuzdev/fuz_util/hash_blake3.js';

Resolves when the BLAKE3 WASM module is initialized and ready. Initialization starts eagerly on import. Idempotent — safe to await multiple times. In Node.js/Deno (sync init), this resolves immediately.

hash_blake3
#

hash_blake3.ts view source

(data: string | Uint8Array<ArrayBufferLike> | BufferSource): string import {hash_blake3} from '@fuzdev/fuz_util/hash_blake3.js';

Computes a BLAKE3 hash synchronously.

data

String or binary data to hash. Strings are UTF-8 encoded.

type string | Uint8Array<ArrayBufferLike> | BufferSource

returns

string

64-character hexadecimal hash string (32 bytes)

Depends on
#

Imported by
#