Blake2 (also exported as Blake2Hash) computes RFC 7693 BLAKE2b digests of configurable length (1 to 64 bytes, default 64) backed by @noble/hashes/blake2.js, and exports the raw EIP-152 compress function used by EVM precompile 0x09 (BLAKE2F).
Pipeline and EIP-152 Compression Layout
Quick Start
API Reference
EIP-152 compress Input Layout (213 Bytes)
compress matches the EVM BLAKE2F precompile (0x09) byte-for-byte:
Errors and Edge Cases
outputLengthoutside1..64throwsBlake2InvalidOutputLengthError.compressthrowsBlake2InvalidInputLengthErrorifinput.length !== 213andBlake2Errorif the final flagfis neither0nor1.- Unlike SHA-256, BLAKE2b is immune to length-extension attacks.
- For WASM execution, import
Blake2Wasmfrom@tevm/voltaire/wasm.

