### Fixed

- Unpaired UTF-16 surrogates in string input produced wrong digests and consumed the following code unit. They are now encoded as U+FFFD, matching `TextEncoder` and Node.js `crypto` (also applies to cSHAKE/KMAC function names, customization strings, and keys, TupleHash, and ParallelHash)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Yi-Cyuan Chen
2026-11-16 21:19:12 +08:00
co-authored by Claude Opus 5.5
parent 054f47e636
commit 290d679fbd
14 changed files with 190 additions and 28 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "js-sha3",
"version": "0.14.0",
"version": "0.15.0",
"description": "A simple SHA-3 / Keccak / SHAKE / cSHAKE / KMAC / TupleHash / ParallelHash hash function for JavaScript supports UTF-8 encoding.",
"main": "src/sha3.js",
"module": "build/sha3.mjs",