unstale

npm / @noble/hashes

@noble/hashes

What changed in @noble/hashes 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.

12 breaking4 security10 performance5 behavior and defaults1 tooling7 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

@noble/hashes 239 changes

Breaking changes 12

  • Fails until entropy is added.

    2.4.0release notes

  • blake2.compress was renamed to _compress and marked internal.

    2.3.0release notes

  • No longer returns a value, improving performance.

    2.2.0release notes

  • The internal crypto module is removed; use built-in WebCrypto instead.

    2.0.0release notes

  • The package is now ESM-only; ESM can be loaded from CommonJS on Node v20.19+.

    2.0.0release notes

  • Hash inputs now accept only Uint8Array; string inputs are prohibited. Use utils.utf8ToBytes to replicate the previous behavior.

    2.0.0release notes

  • Use the .js extension when importing modules, for example @noble/hashes/sha3.js instead of @noble/hashes/sha3.

    2.0.0release notes

  • The blake2b and blake2s modules are renamed to blake2.js; update imports to the new module path.

    2.0.0release notes

  • The ripemd160, sha1, and md5 modules are moved to legacy.js; update imports to the new module path.

    2.0.0release notes

  • The sha256 and sha512 modules are renamed to sha2.js; update imports to the new module path.

    2.0.0release notes

  • The _assert module is renamed to utils.js; update imports to the new module path.

    2.0.0release notes

  • Node v20.19 is now the minimum required version.

    2.0.0release notes

Security 4

  • Use rejection cleanup to wipe work state if scheduling is aborted.

    2.4.0release notes

  • Passed options are protected against mutation and pollution.

    2.4.0release notes

  • Rejects output sizes that caused the engine to crash.

    2.4.0release notes

  • Improves zeroization.

    2.4.0release notes

Performance 10

Behavior and default changes 5

  • Cost options are optional, with defaults t: 3, m: 1024 ** 2 KiB, p: 1, and dkLen: 32; calls using more memory must set maxmem explicitly, whose default limit is 1 GiB.

    2.4.0release notes

  • Yields through scheduler.yield() when available or setTimeout otherwise, allowing timers, I/O, and rendering to progress; accepts optional rejection cleanup.

    2.4.0release notes

  • Corrects the default maxmem to work with N: 2 ** 20, r: 8, and p: 1.

    2.4.0release notes

  • Error messages are improved and type checks are stricter throughout the library.

    2.3.0release notes

  • Error messages are more descriptive.

    2.0.0release notes

Tooling 1

  • TypeScript types and option autocomplete are improved.

    2.0.0release notes

Fixes and other changes 7

  • Fixes tree merging for multi-terabyte streams.

    2.4.0release notes

  • HMAC _cloneInto now preserves canXOF.

    2.3.0release notes

  • The package is now Big Endian friendly, with tests passing on s390x.

    2.2.0release notes

  • Fixes behavior when blockLen=0.

    2.2.0release notes

  • Fixes handling of dkLen=0.

    2.2.0release notes

  • Fixes compilation issues on TypeScript v6.

    2.2.0release notes

  • Byte Array types are fixed for compatibility with TypeScript 5.6 and TypeScript 5.9+.

    2.2.0release notes