npm / @noble/hashes
@noble/hashes
What changed in @noble/hashes 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-19.
3 breaking4 security9 performance5 behavior and defaults9 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@noble/hashes 230 changes
Breaking changes 3
Fails until entropy is added.
blake2.compress was renamed to _compress and marked internal.
No longer returns a value, improving performance.
Security 4
Use rejection cleanup to wipe work state if scheduling is aborted.
Passed options are protected against mutation and pollution.
Rejects output sizes that caused the engine to crash.
Improves zeroization.
Performance 9
Argon2 is 20% faster.
Argon performance improves by 2.2x.
32-bit inputs are 10–45% faster across all hashes.
kmac is 20% faster.
1 MB inputs are 50% faster for KT128, KT256, and TurboSHAKE.
pbkdf2 and hkdf are 20% faster.
SHA-3 and SHAKE are 40% faster.
Runs up to 50% faster.
Improved tree-shaking reduces bundle sizes.
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.
Yields through scheduler.yield() when available or setTimeout otherwise, allowing timers, I/O, and rendering to progress; accepts optional rejection cleanup.
Yields through scheduler.yield() when available or setTimeout otherwise, allowing timers, I/O, and rendering to progress; accepts optional rejection cleanup.
Corrects the default maxmem to work with N: 2 ** 20, r: 8, and p: 1.
Error messages are improved and type checks are stricter throughout the library.
Fixes and other changes 9
Fixes tree merging for multi-terabyte streams.
HMAC _cloneInto now preserves canXOF.
The package is now Big Endian friendly, with tests passing on s390x.
Fixes handling of dkLen=0.
Fixes behavior when blockLen=0.
Fixes handling of dkLen=0.
Fixes handling of dkLen=0.
Fixes compilation issues on TypeScript v6.
Byte Array types are fixed for compatibility with TypeScript 5.6 and TypeScript 5.9+.