### Fixed

- Unpaired UTF-16 surrogates produce wrong digests and consume the next code unit in the JS path. Unpaired surrogates are now encoded as U+FFFD, matching `TextEncoder` and Node.js `crypto`. #57

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Yi-Cyuan Chen
2026-11-16 16:37:59 +08:00
co-authored by Claude Opus 5.5
parent ee1c332b60
commit 68b5c32442
27 changed files with 273 additions and 111 deletions
+7 -7
View File
@@ -208,7 +208,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="md5.js.html">md5.js</a>, <a href="md5.js.html#line722">line 722</a>
<a href="md5.js.html">md5.js</a>, <a href="md5.js.html#line734">line 734</a>
</li></ul></dd>
@@ -330,7 +330,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="md5.js.html">md5.js</a>, <a href="md5.js.html#line734">line 734</a>
<a href="md5.js.html">md5.js</a>, <a href="md5.js.html#line746">line 746</a>
</li></ul></dd>
@@ -452,7 +452,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="md5.js.html">md5.js</a>, <a href="md5.js.html#line772">line 772</a>
<a href="md5.js.html">md5.js</a>, <a href="md5.js.html#line784">line 784</a>
</li></ul></dd>
@@ -576,7 +576,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="md5.js.html">md5.js</a>, <a href="md5.js.html#line756">line 756</a>
<a href="md5.js.html">md5.js</a>, <a href="md5.js.html#line768">line 768</a>
</li></ul></dd>
@@ -698,7 +698,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="md5.js.html">md5.js</a>, <a href="md5.js.html#line700">line 700</a>
<a href="md5.js.html">md5.js</a>, <a href="md5.js.html#line712">line 712</a>
</li></ul></dd>
@@ -820,7 +820,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="md5.js.html">md5.js</a>, <a href="md5.js.html#line655">line 655</a>
<a href="md5.js.html">md5.js</a>, <a href="md5.js.html#line667">line 667</a>
</li></ul></dd>
@@ -942,7 +942,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="md5.js.html">md5.js</a>, <a href="md5.js.html#line688">line 688</a>
<a href="md5.js.html">md5.js</a>, <a href="md5.js.html#line700">line 700</a>
</li></ul></dd>