Skip to content

Generichash

BLAKE2b hashing with variable output length (16–64 bytes), optional key, and streaming support. Can be used unkeyed (like SHA-256) or keyed (as a MAC). One-shot (hash): hashes a buffer in a single call. Streaming (newupdatefinal): hashes data incrementally; final may only be called once.

Generichash . hash ( message outputBytes key )  -> buffer

Hashes message in one call and returns a digest of outputBytes bytes (default 32, range 16–64). Optionally accepts a key (16–64 bytes) to produce a keyed BLAKE2b digest.

Parameters

message: buffer
outputBytes: number?
key: buffer?

Returns

buffer