Compare commits

..
12 Commits
Author SHA1 Message Date
Yi-Cyuan ChenandClaude Opus 5.5 2bf0dfe852 ### Changed
- Update transitive dev dependencies to fix security advisories (brace-expansion, browserslist, diff, glob, js-yaml, markdown-it, minimatch, serialize-javascript)
- Drop Node.js 16 from CI

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 16:48:47 +08:00
emn178andGitHub 43adee1975 Merge pull request #56 from emn178/dependabot/npm_and_yarn/markdown-it-14.3.3
Bump markdown-it from 14.3.0 to 14.3.3
2026-11-16 16:40:40 +08:00
emn178andGitHub 6fcf6a9639 Merge pull request #55 from emn178/dependabot/npm_and_yarn/multi-581aeff57e
Bump brace-expansion
2026-11-16 16:40:28 +08:00
emn178andGitHub 34f76ca8f2 Merge pull request #53 from emn178/dependabot/npm_and_yarn/multi-c5ebbb4833
Bump js-yaml
2026-11-16 16:40:17 +08:00
emn178andGitHub 5a922fe1d6 Merge pull request #51 from emn178/dependabot/npm_and_yarn/browserslist-4.28.9
Bump browserslist from 4.28.6 to 4.28.9
2026-11-16 16:38:49 +08:00
Yi-Cyuan ChenandClaude Opus 5.5 68b5c32442 ### 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>
2026-11-16 16:37:59 +08:00
dependabot[bot]andGitHub 56ba32d25d Bump markdown-it from 14.3.0 to 14.3.3
Bumps [markdown-it](https://github.com/markdown-it/markdown-it) from 14.3.0 to 14.3.3.
- [Changelog](https://github.com/markdown-it/markdown-it/blob/14.3.3/CHANGELOG.md)
- [Commits](https://github.com/markdown-it/markdown-it/compare/14.3.0...14.3.3)

---
updated-dependencies:
- dependency-name: markdown-it
  dependency-version: 14.3.3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-21 22:55:12 +00:00
dependabot[bot]andGitHub f44a93667b Bump brace-expansion
Bumps  and [brace-expansion](https://github.com/juliangruber/brace-expansion). These dependencies needed to be updated together.

Updates `brace-expansion` from 2.1.2 to 2.1.7
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](https://github.com/juliangruber/brace-expansion/compare/v2.1.2...v2.1.7)

Updates `brace-expansion` from 5.0.7 to 5.0.12
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](https://github.com/juliangruber/brace-expansion/compare/v2.1.2...v2.1.7)

---
updated-dependencies:
- dependency-name: brace-expansion
  dependency-version: 2.1.7
  dependency-type: indirect
- dependency-name: brace-expansion
  dependency-version: 5.0.12
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-10-12 19:28:48 +00:00
dependabot[bot]andGitHub 906ee91381 Bump js-yaml
Bumps  and [js-yaml](https://github.com/nodeca/js-yaml). These dependencies needed to be updated together.

Updates `js-yaml` from 4.3.0 to 4.3.2
- [Changelog](https://github.com/nodeca/js-yaml/blob/4.3.2/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/4.3.0...4.3.2)

Updates `js-yaml` from 3.15.0 to 3.15.2
- [Changelog](https://github.com/nodeca/js-yaml/blob/4.3.2/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/4.3.0...4.3.2)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 4.3.2
  dependency-type: indirect
- dependency-name: js-yaml
  dependency-version: 3.15.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-13 15:30:19 +00:00
dependabot[bot]andGitHub e55d53a634 Bump browserslist from 4.28.6 to 4.28.9
Bumps [browserslist](https://github.com/browserslist/browserslist) from 4.28.6 to 4.28.9.
- [Release notes](https://github.com/browserslist/browserslist/releases)
- [Changelog](https://github.com/browserslist/browserslist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/browserslist/browserslist/compare/4.28.6...4.28.9)

---
updated-dependencies:
- dependency-name: browserslist
  dependency-version: 4.28.9
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-07 15:37:09 +00:00
Yi-Cyuan Chen ee1c332b60 fixed ci 2026-07-20 14:44:06 +08:00
Yi-Cyuan Chen f6407a6c0c fixed CI tests 2026-07-20 14:23:54 +08:00
32 changed files with 400 additions and 764 deletions
+8 -4
View File
@@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x, 20.x, 22.x]
node-version: [18.x, 20.x, 22.x, 24.x]
steps:
- name: Checkout code
uses: actions/checkout@v4
@@ -27,18 +27,22 @@ jobs:
run: npm ci
- name: Build
if: matrix.node-version == '22.x'
if: matrix.node-version == '24.x'
run: npm run build
- name: Check generated files
if: matrix.node-version == '24.x'
run: git diff --exit-code -- build
- name: Run tests
run: npm test
- name: Generate coverage report
if: matrix.node-version == '22.x'
if: matrix.node-version == '24.x'
run: npm run coverage
- name: Upload to coveralls
if: matrix.node-version == '22.x'
if: matrix.node-version == '24.x'
uses: coverallsapp/github-action@v2
with:
file: ./coverage.lcov
+1
View File
@@ -2,3 +2,4 @@
/covreporter/
/.nyc_output/
/coverage/
coverage.lcov
+12
View File
@@ -1,5 +1,17 @@
# Change Log
## v0.10.0 / 2026-11-16
### 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
### Changed
- Update transitive dev dependencies to fix security advisories (brace-expansion, browserslist, diff, glob, js-yaml, markdown-it, minimatch, serialize-javascript)
- Drop Node.js 16 from CI
## v0.9.2 / 2026-07-20
### Fixed
- CI test.
## v0.9.1 / 2026-07-20
### Changed
- web worker detection. #44
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "js-md5",
"version": "0.9.0",
"version": "0.10.0",
"main": ["src/md5.js"],
"ignore": [
"tests"
+10 -4
View File
@@ -2,7 +2,7 @@
* [js-md5]{@link https://github.com/emn178/js-md5}
*
* @namespace md5
* @version 0.9.0
* @version 0.10.0
* @author Chen, Yi-Cyuan [emn178@gmail.com]
* @copyright Chen, Yi-Cyuan 2014-2026
* @license MIT
@@ -227,7 +227,7 @@
var result = formatMessage(message);
message = result[0];
var isString = result[1];
var code, index = 0, i, length = message.length, blocks = this.blocks;
var code, code2, index = 0, i, length = message.length, blocks = this.blocks;
var buffer8 = this.buffer8;
while (index < length) {
@@ -253,12 +253,18 @@
buffer8[i++] = 0xe0 | (code >>> 12);
buffer8[i++] = 0x80 | ((code >>> 6) & 0x3f);
buffer8[i++] = 0x80 | (code & 0x3f);
} else {
code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));
} else if (code < 0xdc00 && (code2 = message.charCodeAt(index + 1)) >= 0xdc00 && code2 < 0xe000) {
++index;
code = 0x10000 + (((code & 0x3ff) << 10) | (code2 & 0x3ff));
buffer8[i++] = 0xf0 | (code >>> 18);
buffer8[i++] = 0x80 | ((code >>> 12) & 0x3f);
buffer8[i++] = 0x80 | ((code >>> 6) & 0x3f);
buffer8[i++] = 0x80 | (code & 0x3f);
} else {
// unpaired surrogate: U+FFFD
buffer8[i++] = 0xef;
buffer8[i++] = 0xbf;
buffer8[i++] = 0xbd;
}
}
}
+2 -2
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+10 -4
View File
@@ -8,7 +8,7 @@ var md5$1 = {exports: {}};
* [js-md5]{@link https://github.com/emn178/js-md5}
*
* @namespace md5
* @version 0.9.0
* @version 0.10.0
* @author Chen, Yi-Cyuan [emn178@gmail.com]
* @copyright Chen, Yi-Cyuan 2014-2026
* @license MIT
@@ -203,7 +203,7 @@ var md5$1 = {exports: {}};
var result = formatMessage(message);
message = result[0];
var isString = result[1];
var code, index = 0, i, length = message.length, blocks = this.blocks;
var code, code2, index = 0, i, length = message.length, blocks = this.blocks;
var buffer8 = this.buffer8;
while (index < length) {
@@ -229,12 +229,18 @@ var md5$1 = {exports: {}};
buffer8[i++] = 0xe0 | (code >>> 12);
buffer8[i++] = 0x80 | ((code >>> 6) & 0x3f);
buffer8[i++] = 0x80 | (code & 0x3f);
} else {
code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));
} else if (code < 0xdc00 && (code2 = message.charCodeAt(index + 1)) >= 0xdc00 && code2 < 0xe000) {
++index;
code = 0x10000 + (((code & 0x3ff) << 10) | (code2 & 0x3ff));
buffer8[i++] = 0xf0 | (code >>> 18);
buffer8[i++] = 0x80 | ((code >>> 12) & 0x3f);
buffer8[i++] = 0x80 | ((code >>> 6) & 0x3f);
buffer8[i++] = 0x80 | (code & 0x3f);
} else {
// unpaired surrogate: U+FFFD
buffer8[i++] = 0xef;
buffer8[i++] = 0xbf;
buffer8[i++] = 0xbd;
}
}
}
+10 -4
View File
@@ -13,7 +13,7 @@ var md5$1 = {exports: {}};
* [js-md5]{@link https://github.com/emn178/js-md5}
*
* @namespace md5
* @version 0.9.0
* @version 0.10.0
* @author Chen, Yi-Cyuan [emn178@gmail.com]
* @copyright Chen, Yi-Cyuan 2014-2026
* @license MIT
@@ -239,7 +239,7 @@ var md5$1 = {exports: {}};
var result = formatMessage(message);
message = result[0];
var isString = result[1];
var code, index = 0, i, length = message.length, blocks = this.blocks;
var code, code2, index = 0, i, length = message.length, blocks = this.blocks;
var buffer8 = this.buffer8;
while (index < length) {
@@ -265,12 +265,18 @@ var md5$1 = {exports: {}};
buffer8[i++] = 0xe0 | (code >>> 12);
buffer8[i++] = 0x80 | ((code >>> 6) & 0x3f);
buffer8[i++] = 0x80 | (code & 0x3f);
} else {
code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));
} else if (code < 0xdc00 && (code2 = message.charCodeAt(index + 1)) >= 0xdc00 && code2 < 0xe000) {
++index;
code = 0x10000 + (((code & 0x3ff) << 10) | (code2 & 0x3ff));
buffer8[i++] = 0xf0 | (code >>> 18);
buffer8[i++] = 0x80 | ((code >>> 12) & 0x3f);
buffer8[i++] = 0x80 | ((code >>> 6) & 0x3f);
buffer8[i++] = 0x80 | (code & 0x3f);
} else {
// unpaired surrogate: U+FFFD
buffer8[i++] = 0xef;
buffer8[i++] = 0xbf;
buffer8[i++] = 0xbd;
}
}
}
+27 -9
View File
@@ -2,7 +2,7 @@
* [js-md5]{@link https://github.com/emn178/js-md5}
*
* @namespace md5
* @version 0.9.0
* @version 0.10.0
* @author Chen, Yi-Cyuan [emn178@gmail.com]
* @copyright Chen, Yi-Cyuan 2014-2026
* @license MIT
@@ -369,7 +369,7 @@
var result = formatMessage(message);
message = result[0];
var isString = result[1];
var code, index = 0, i, length = message.length, blocks = this.blocks;
var code, code2, index = 0, i, length = message.length, blocks = this.blocks;
var buffer8 = this.buffer8;
while (index < length) {
@@ -395,12 +395,18 @@
buffer8[i++] = 0xe0 | (code >>> 12);
buffer8[i++] = 0x80 | ((code >>> 6) & 0x3f);
buffer8[i++] = 0x80 | (code & 0x3f);
} else {
code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));
} else if (code < 0xdc00 && (code2 = message.charCodeAt(index + 1)) >= 0xdc00 && code2 < 0xe000) {
++index;
code = 0x10000 + (((code & 0x3ff) << 10) | (code2 & 0x3ff));
buffer8[i++] = 0xf0 | (code >>> 18);
buffer8[i++] = 0x80 | ((code >>> 12) & 0x3f);
buffer8[i++] = 0x80 | ((code >>> 6) & 0x3f);
buffer8[i++] = 0x80 | (code & 0x3f);
} else {
// unpaired surrogate: U+FFFD
buffer8[i++] = 0xef;
buffer8[i++] = 0xbf;
buffer8[i++] = 0xbd;
}
}
} else {
@@ -415,12 +421,18 @@
blocks[i >>> 2] |= (0xe0 | (code >>> 12)) << SHIFT[i++ & 3];
blocks[i >>> 2] |= (0x80 | ((code >>> 6) & 0x3f)) << SHIFT[i++ & 3];
blocks[i >>> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];
} else {
code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));
} else if (code < 0xdc00 && (code2 = message.charCodeAt(index + 1)) >= 0xdc00 && code2 < 0xe000) {
++index;
code = 0x10000 + (((code & 0x3ff) << 10) | (code2 & 0x3ff));
blocks[i >>> 2] |= (0xf0 | (code >>> 18)) << SHIFT[i++ & 3];
blocks[i >>> 2] |= (0x80 | ((code >>> 12) & 0x3f)) << SHIFT[i++ & 3];
blocks[i >>> 2] |= (0x80 | ((code >>> 6) & 0x3f)) << SHIFT[i++ & 3];
blocks[i >>> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];
} else {
// unpaired surrogate: U+FFFD
blocks[i >>> 2] |= 0xef << SHIFT[i++ & 3];
blocks[i >>> 2] |= 0xbf << SHIFT[i++ & 3];
blocks[i >>> 2] |= 0xbd << SHIFT[i++ & 3];
}
}
}
@@ -803,7 +815,7 @@
var i, result = formatMessage(key);
key = result[0];
if (result[1]) {
var bytes = [], length = key.length, index = 0, code;
var bytes = [], length = key.length, index = 0, code, code2;
for (i = 0; i < length; ++i) {
code = key.charCodeAt(i);
if (code < 0x80) {
@@ -815,12 +827,18 @@
bytes[index++] = (0xe0 | (code >>> 12));
bytes[index++] = (0x80 | ((code >>> 6) & 0x3f));
bytes[index++] = (0x80 | (code & 0x3f));
} else {
code = 0x10000 + (((code & 0x3ff) << 10) | (key.charCodeAt(++i) & 0x3ff));
} else if (code < 0xdc00 && (code2 = key.charCodeAt(i + 1)) >= 0xdc00 && code2 < 0xe000) {
++i;
code = 0x10000 + (((code & 0x3ff) << 10) | (code2 & 0x3ff));
bytes[index++] = (0xf0 | (code >>> 18));
bytes[index++] = (0x80 | ((code >>> 12) & 0x3f));
bytes[index++] = (0x80 | ((code >>> 6) & 0x3f));
bytes[index++] = (0x80 | (code & 0x3f));
} else {
// unpaired surrogate: U+FFFD
bytes[index++] = 0xef;
bytes[index++] = 0xbf;
bytes[index++] = 0xbd;
}
}
key = bytes;
+2 -2
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
File diff suppressed because one or more lines are too long
+27 -9
View File
@@ -8,7 +8,7 @@ var md5$1 = {exports: {}};
* [js-md5]{@link https://github.com/emn178/js-md5}
*
* @namespace md5
* @version 0.9.0
* @version 0.10.0
* @author Chen, Yi-Cyuan [emn178@gmail.com]
* @copyright Chen, Yi-Cyuan 2014-2026
* @license MIT
@@ -340,7 +340,7 @@ var md5$1 = {exports: {}};
var result = formatMessage(message);
message = result[0];
var isString = result[1];
var code, index = 0, i, length = message.length, blocks = this.blocks;
var code, code2, index = 0, i, length = message.length, blocks = this.blocks;
var buffer8 = this.buffer8;
while (index < length) {
@@ -366,12 +366,18 @@ var md5$1 = {exports: {}};
buffer8[i++] = 0xe0 | (code >>> 12);
buffer8[i++] = 0x80 | ((code >>> 6) & 0x3f);
buffer8[i++] = 0x80 | (code & 0x3f);
} else {
code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));
} else if (code < 0xdc00 && (code2 = message.charCodeAt(index + 1)) >= 0xdc00 && code2 < 0xe000) {
++index;
code = 0x10000 + (((code & 0x3ff) << 10) | (code2 & 0x3ff));
buffer8[i++] = 0xf0 | (code >>> 18);
buffer8[i++] = 0x80 | ((code >>> 12) & 0x3f);
buffer8[i++] = 0x80 | ((code >>> 6) & 0x3f);
buffer8[i++] = 0x80 | (code & 0x3f);
} else {
// unpaired surrogate: U+FFFD
buffer8[i++] = 0xef;
buffer8[i++] = 0xbf;
buffer8[i++] = 0xbd;
}
}
} else {
@@ -386,12 +392,18 @@ var md5$1 = {exports: {}};
blocks[i >>> 2] |= (0xe0 | (code >>> 12)) << SHIFT[i++ & 3];
blocks[i >>> 2] |= (0x80 | ((code >>> 6) & 0x3f)) << SHIFT[i++ & 3];
blocks[i >>> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];
} else {
code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));
} else if (code < 0xdc00 && (code2 = message.charCodeAt(index + 1)) >= 0xdc00 && code2 < 0xe000) {
++index;
code = 0x10000 + (((code & 0x3ff) << 10) | (code2 & 0x3ff));
blocks[i >>> 2] |= (0xf0 | (code >>> 18)) << SHIFT[i++ & 3];
blocks[i >>> 2] |= (0x80 | ((code >>> 12) & 0x3f)) << SHIFT[i++ & 3];
blocks[i >>> 2] |= (0x80 | ((code >>> 6) & 0x3f)) << SHIFT[i++ & 3];
blocks[i >>> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];
} else {
// unpaired surrogate: U+FFFD
blocks[i >>> 2] |= 0xef << SHIFT[i++ & 3];
blocks[i >>> 2] |= 0xbf << SHIFT[i++ & 3];
blocks[i >>> 2] |= 0xbd << SHIFT[i++ & 3];
}
}
}
@@ -774,7 +786,7 @@ var md5$1 = {exports: {}};
var i, result = formatMessage(key);
key = result[0];
if (result[1]) {
var bytes = [], length = key.length, index = 0, code;
var bytes = [], length = key.length, index = 0, code, code2;
for (i = 0; i < length; ++i) {
code = key.charCodeAt(i);
if (code < 0x80) {
@@ -786,12 +798,18 @@ var md5$1 = {exports: {}};
bytes[index++] = (0xe0 | (code >>> 12));
bytes[index++] = (0x80 | ((code >>> 6) & 0x3f));
bytes[index++] = (0x80 | (code & 0x3f));
} else {
code = 0x10000 + (((code & 0x3ff) << 10) | (key.charCodeAt(++i) & 0x3ff));
} else if (code < 0xdc00 && (code2 = key.charCodeAt(i + 1)) >= 0xdc00 && code2 < 0xe000) {
++i;
code = 0x10000 + (((code & 0x3ff) << 10) | (code2 & 0x3ff));
bytes[index++] = (0xf0 | (code >>> 18));
bytes[index++] = (0x80 | ((code >>> 12) & 0x3f));
bytes[index++] = (0x80 | ((code >>> 6) & 0x3f));
bytes[index++] = (0x80 | (code & 0x3f));
} else {
// unpaired surrogate: U+FFFD
bytes[index++] = 0xef;
bytes[index++] = 0xbf;
bytes[index++] = 0xbd;
}
}
key = bytes;
+19 -7
View File
@@ -2,7 +2,7 @@
* [js-md5]{@link https://github.com/emn178/js-md5}
*
* @namespace md5
* @version 0.9.0
* @version 0.10.0
* @author Chen, Yi-Cyuan [emn178@gmail.com]
* @copyright Chen, Yi-Cyuan 2014-2026
* @license MIT
@@ -347,7 +347,7 @@
var result = formatMessage(message);
message = result[0];
var isString = result[1];
var code, index = 0, i, length = message.length, blocks = this.blocks;
var code, code2, index = 0, i, length = message.length, blocks = this.blocks;
var buffer8 = this.buffer8;
while (index < length) {
@@ -373,12 +373,18 @@
buffer8[i++] = 0xe0 | (code >>> 12);
buffer8[i++] = 0x80 | ((code >>> 6) & 0x3f);
buffer8[i++] = 0x80 | (code & 0x3f);
} else {
code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));
} else if (code < 0xdc00 && (code2 = message.charCodeAt(index + 1)) >= 0xdc00 && code2 < 0xe000) {
++index;
code = 0x10000 + (((code & 0x3ff) << 10) | (code2 & 0x3ff));
buffer8[i++] = 0xf0 | (code >>> 18);
buffer8[i++] = 0x80 | ((code >>> 12) & 0x3f);
buffer8[i++] = 0x80 | ((code >>> 6) & 0x3f);
buffer8[i++] = 0x80 | (code & 0x3f);
} else {
// unpaired surrogate: U+FFFD
buffer8[i++] = 0xef;
buffer8[i++] = 0xbf;
buffer8[i++] = 0xbd;
}
}
}
@@ -757,7 +763,7 @@
var i, result = formatMessage(key);
key = result[0];
if (result[1]) {
var bytes = [], length = key.length, index = 0, code;
var bytes = [], length = key.length, index = 0, code, code2;
for (i = 0; i < length; ++i) {
code = key.charCodeAt(i);
if (code < 0x80) {
@@ -769,12 +775,18 @@
bytes[index++] = (0xe0 | (code >>> 12));
bytes[index++] = (0x80 | ((code >>> 6) & 0x3f));
bytes[index++] = (0x80 | (code & 0x3f));
} else {
code = 0x10000 + (((code & 0x3ff) << 10) | (key.charCodeAt(++i) & 0x3ff));
} else if (code < 0xdc00 && (code2 = key.charCodeAt(i + 1)) >= 0xdc00 && code2 < 0xe000) {
++i;
code = 0x10000 + (((code & 0x3ff) << 10) | (code2 & 0x3ff));
bytes[index++] = (0xf0 | (code >>> 18));
bytes[index++] = (0x80 | ((code >>> 12) & 0x3f));
bytes[index++] = (0x80 | ((code >>> 6) & 0x3f));
bytes[index++] = (0x80 | (code & 0x3f));
} else {
// unpaired surrogate: U+FFFD
bytes[index++] = 0xef;
bytes[index++] = 0xbf;
bytes[index++] = 0xbd;
}
}
key = bytes;
+2 -2
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+19 -7
View File
@@ -8,7 +8,7 @@ var md5$1 = {exports: {}};
* [js-md5]{@link https://github.com/emn178/js-md5}
*
* @namespace md5
* @version 0.9.0
* @version 0.10.0
* @author Chen, Yi-Cyuan [emn178@gmail.com]
* @copyright Chen, Yi-Cyuan 2014-2026
* @license MIT
@@ -323,7 +323,7 @@ var md5$1 = {exports: {}};
var result = formatMessage(message);
message = result[0];
var isString = result[1];
var code, index = 0, i, length = message.length, blocks = this.blocks;
var code, code2, index = 0, i, length = message.length, blocks = this.blocks;
var buffer8 = this.buffer8;
while (index < length) {
@@ -349,12 +349,18 @@ var md5$1 = {exports: {}};
buffer8[i++] = 0xe0 | (code >>> 12);
buffer8[i++] = 0x80 | ((code >>> 6) & 0x3f);
buffer8[i++] = 0x80 | (code & 0x3f);
} else {
code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));
} else if (code < 0xdc00 && (code2 = message.charCodeAt(index + 1)) >= 0xdc00 && code2 < 0xe000) {
++index;
code = 0x10000 + (((code & 0x3ff) << 10) | (code2 & 0x3ff));
buffer8[i++] = 0xf0 | (code >>> 18);
buffer8[i++] = 0x80 | ((code >>> 12) & 0x3f);
buffer8[i++] = 0x80 | ((code >>> 6) & 0x3f);
buffer8[i++] = 0x80 | (code & 0x3f);
} else {
// unpaired surrogate: U+FFFD
buffer8[i++] = 0xef;
buffer8[i++] = 0xbf;
buffer8[i++] = 0xbd;
}
}
}
@@ -733,7 +739,7 @@ var md5$1 = {exports: {}};
var i, result = formatMessage(key);
key = result[0];
if (result[1]) {
var bytes = [], length = key.length, index = 0, code;
var bytes = [], length = key.length, index = 0, code, code2;
for (i = 0; i < length; ++i) {
code = key.charCodeAt(i);
if (code < 0x80) {
@@ -745,12 +751,18 @@ var md5$1 = {exports: {}};
bytes[index++] = (0xe0 | (code >>> 12));
bytes[index++] = (0x80 | ((code >>> 6) & 0x3f));
bytes[index++] = (0x80 | (code & 0x3f));
} else {
code = 0x10000 + (((code & 0x3ff) << 10) | (key.charCodeAt(++i) & 0x3ff));
} else if (code < 0xdc00 && (code2 = key.charCodeAt(i + 1)) >= 0xdc00 && code2 < 0xe000) {
++i;
code = 0x10000 + (((code & 0x3ff) << 10) | (code2 & 0x3ff));
bytes[index++] = (0xf0 | (code >>> 18));
bytes[index++] = (0x80 | ((code >>> 12) & 0x3f));
bytes[index++] = (0x80 | ((code >>> 6) & 0x3f));
bytes[index++] = (0x80 | (code & 0x3f));
} else {
// unpaired surrogate: U+FFFD
bytes[index++] = 0xef;
bytes[index++] = 0xbf;
bytes[index++] = 0xbd;
}
}
key = bytes;
+19 -7
View File
@@ -13,7 +13,7 @@ var md5$1 = {exports: {}};
* [js-md5]{@link https://github.com/emn178/js-md5}
*
* @namespace md5
* @version 0.9.0
* @version 0.10.0
* @author Chen, Yi-Cyuan [emn178@gmail.com]
* @copyright Chen, Yi-Cyuan 2014-2026
* @license MIT
@@ -359,7 +359,7 @@ var md5$1 = {exports: {}};
var result = formatMessage(message);
message = result[0];
var isString = result[1];
var code, index = 0, i, length = message.length, blocks = this.blocks;
var code, code2, index = 0, i, length = message.length, blocks = this.blocks;
var buffer8 = this.buffer8;
while (index < length) {
@@ -385,12 +385,18 @@ var md5$1 = {exports: {}};
buffer8[i++] = 0xe0 | (code >>> 12);
buffer8[i++] = 0x80 | ((code >>> 6) & 0x3f);
buffer8[i++] = 0x80 | (code & 0x3f);
} else {
code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));
} else if (code < 0xdc00 && (code2 = message.charCodeAt(index + 1)) >= 0xdc00 && code2 < 0xe000) {
++index;
code = 0x10000 + (((code & 0x3ff) << 10) | (code2 & 0x3ff));
buffer8[i++] = 0xf0 | (code >>> 18);
buffer8[i++] = 0x80 | ((code >>> 12) & 0x3f);
buffer8[i++] = 0x80 | ((code >>> 6) & 0x3f);
buffer8[i++] = 0x80 | (code & 0x3f);
} else {
// unpaired surrogate: U+FFFD
buffer8[i++] = 0xef;
buffer8[i++] = 0xbf;
buffer8[i++] = 0xbd;
}
}
}
@@ -769,7 +775,7 @@ var md5$1 = {exports: {}};
var i, result = formatMessage(key);
key = result[0];
if (result[1]) {
var bytes = [], length = key.length, index = 0, code;
var bytes = [], length = key.length, index = 0, code, code2;
for (i = 0; i < length; ++i) {
code = key.charCodeAt(i);
if (code < 0x80) {
@@ -781,12 +787,18 @@ var md5$1 = {exports: {}};
bytes[index++] = (0xe0 | (code >>> 12));
bytes[index++] = (0x80 | ((code >>> 6) & 0x3f));
bytes[index++] = (0x80 | (code & 0x3f));
} else {
code = 0x10000 + (((code & 0x3ff) << 10) | (key.charCodeAt(++i) & 0x3ff));
} else if (code < 0xdc00 && (code2 = key.charCodeAt(i + 1)) >= 0xdc00 && code2 < 0xe000) {
++i;
code = 0x10000 + (((code & 0x3ff) << 10) | (code2 & 0x3ff));
bytes[index++] = (0xf0 | (code >>> 18));
bytes[index++] = (0x80 | ((code >>> 12) & 0x3f));
bytes[index++] = (0x80 | ((code >>> 6) & 0x3f));
bytes[index++] = (0x80 | (code & 0x3f));
} else {
// unpaired surrogate: U+FFFD
bytes[index++] = 0xef;
bytes[index++] = 0xbf;
bytes[index++] = 0xbd;
}
}
key = bytes;
+27 -9
View File
@@ -13,7 +13,7 @@ var md5$1 = {exports: {}};
* [js-md5]{@link https://github.com/emn178/js-md5}
*
* @namespace md5
* @version 0.9.0
* @version 0.10.0
* @author Chen, Yi-Cyuan [emn178@gmail.com]
* @copyright Chen, Yi-Cyuan 2014-2026
* @license MIT
@@ -381,7 +381,7 @@ var md5$1 = {exports: {}};
var result = formatMessage(message);
message = result[0];
var isString = result[1];
var code, index = 0, i, length = message.length, blocks = this.blocks;
var code, code2, index = 0, i, length = message.length, blocks = this.blocks;
var buffer8 = this.buffer8;
while (index < length) {
@@ -407,12 +407,18 @@ var md5$1 = {exports: {}};
buffer8[i++] = 0xe0 | (code >>> 12);
buffer8[i++] = 0x80 | ((code >>> 6) & 0x3f);
buffer8[i++] = 0x80 | (code & 0x3f);
} else {
code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));
} else if (code < 0xdc00 && (code2 = message.charCodeAt(index + 1)) >= 0xdc00 && code2 < 0xe000) {
++index;
code = 0x10000 + (((code & 0x3ff) << 10) | (code2 & 0x3ff));
buffer8[i++] = 0xf0 | (code >>> 18);
buffer8[i++] = 0x80 | ((code >>> 12) & 0x3f);
buffer8[i++] = 0x80 | ((code >>> 6) & 0x3f);
buffer8[i++] = 0x80 | (code & 0x3f);
} else {
// unpaired surrogate: U+FFFD
buffer8[i++] = 0xef;
buffer8[i++] = 0xbf;
buffer8[i++] = 0xbd;
}
}
} else {
@@ -427,12 +433,18 @@ var md5$1 = {exports: {}};
blocks[i >>> 2] |= (0xe0 | (code >>> 12)) << SHIFT[i++ & 3];
blocks[i >>> 2] |= (0x80 | ((code >>> 6) & 0x3f)) << SHIFT[i++ & 3];
blocks[i >>> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];
} else {
code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));
} else if (code < 0xdc00 && (code2 = message.charCodeAt(index + 1)) >= 0xdc00 && code2 < 0xe000) {
++index;
code = 0x10000 + (((code & 0x3ff) << 10) | (code2 & 0x3ff));
blocks[i >>> 2] |= (0xf0 | (code >>> 18)) << SHIFT[i++ & 3];
blocks[i >>> 2] |= (0x80 | ((code >>> 12) & 0x3f)) << SHIFT[i++ & 3];
blocks[i >>> 2] |= (0x80 | ((code >>> 6) & 0x3f)) << SHIFT[i++ & 3];
blocks[i >>> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];
} else {
// unpaired surrogate: U+FFFD
blocks[i >>> 2] |= 0xef << SHIFT[i++ & 3];
blocks[i >>> 2] |= 0xbf << SHIFT[i++ & 3];
blocks[i >>> 2] |= 0xbd << SHIFT[i++ & 3];
}
}
}
@@ -815,7 +827,7 @@ var md5$1 = {exports: {}};
var i, result = formatMessage(key);
key = result[0];
if (result[1]) {
var bytes = [], length = key.length, index = 0, code;
var bytes = [], length = key.length, index = 0, code, code2;
for (i = 0; i < length; ++i) {
code = key.charCodeAt(i);
if (code < 0x80) {
@@ -827,12 +839,18 @@ var md5$1 = {exports: {}};
bytes[index++] = (0xe0 | (code >>> 12));
bytes[index++] = (0x80 | ((code >>> 6) & 0x3f));
bytes[index++] = (0x80 | (code & 0x3f));
} else {
code = 0x10000 + (((code & 0x3ff) << 10) | (key.charCodeAt(++i) & 0x3ff));
} else if (code < 0xdc00 && (code2 = key.charCodeAt(i + 1)) >= 0xdc00 && code2 < 0xe000) {
++i;
code = 0x10000 + (((code & 0x3ff) << 10) | (code2 & 0x3ff));
bytes[index++] = (0xf0 | (code >>> 18));
bytes[index++] = (0x80 | ((code >>> 12) & 0x3f));
bytes[index++] = (0x80 | ((code >>> 6) & 0x3f));
bytes[index++] = (0x80 | (code & 0x3f));
} else {
// unpaired surrogate: U+FFFD
bytes[index++] = 0xef;
bytes[index++] = 0xbf;
bytes[index++] = 0xbd;
}
}
key = bytes;
+9 -9
View File
@@ -93,7 +93,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#line803">line 803</a>
<a href="md5.js.html">md5.js</a>, <a href="md5.js.html#line815">line 815</a>
</li></ul></dd>
@@ -224,7 +224,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>
@@ -351,7 +351,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>
@@ -478,7 +478,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>
@@ -607,7 +607,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>
@@ -734,7 +734,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>
@@ -861,7 +861,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>
@@ -988,7 +988,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>
@@ -1254,7 +1254,7 @@
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a> on Mon Jul 20 2026 10:47:41 GMT+0800 (Taipei Standard Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a>
</footer>
<script> prettyPrint(); </script>
+2 -2
View File
@@ -47,7 +47,7 @@
<dt class="tag-version">Version:</dt>
<dd class="tag-version"><ul class="dummy"><li>0.9.0</li></ul></dd>
<dd class="tag-version"><ul class="dummy"><li>0.10.0</li></ul></dd>
@@ -1483,7 +1483,7 @@ hash.update('The quick brown fox jumps over the lazy dog');</code></pre>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a> on Mon Jul 20 2026 10:47:41 GMT+0800 (Taipei Standard Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a>
</footer>
<script> prettyPrint(); </script>
+2 -2
View File
@@ -214,7 +214,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#line882">line 882</a>
<a href="md5.js.html">md5.js</a>, <a href="md5.js.html#line900">line 900</a>
</li></ul></dd>
@@ -302,7 +302,7 @@ md5(new Uint8Array([])); // d41d8cd98f00b204e9800998ecf8427e</code></pre>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a> on Mon Jul 20 2026 10:47:41 GMT+0800 (Taipei Standard Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a>
</footer>
<script> prettyPrint(); </script>
+1 -1
View File
@@ -204,7 +204,7 @@ Author: Chen, Yi-Cyuan (emn178@gmail.com)</p></article>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a> on Mon Jul 20 2026 10:47:41 GMT+0800 (Taipei Standard Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a>
</footer>
<script> prettyPrint(); </script>
+1 -1
View File
@@ -1741,7 +1741,7 @@ hash.update('The quick brown fox jumps over the lazy dog');</code></pre>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a> on Mon Jul 20 2026 10:47:41 GMT+0800 (Taipei Standard Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a>
</footer>
<script> prettyPrint(); </script>
+8 -8
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>
@@ -1203,7 +1203,7 @@
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a> on Mon Jul 20 2026 10:47:41 GMT+0800 (Taipei Standard Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a>
</footer>
<script> prettyPrint(); </script>
+28 -10
View File
@@ -30,7 +30,7 @@
* [js-md5]{@link https://github.com/emn178/js-md5}
*
* @namespace md5
* @version 0.9.0
* @version 0.10.0
* @author Chen, Yi-Cyuan [emn178@gmail.com]
* @copyright Chen, Yi-Cyuan 2014-2026
* @license MIT
@@ -405,7 +405,7 @@
var result = formatMessage(message);
message = result[0];
var isString = result[1];
var code, index = 0, i, length = message.length, blocks = this.blocks;
var code, code2, index = 0, i, length = message.length, blocks = this.blocks;
var buffer8 = this.buffer8;
while (index &lt; length) {
@@ -431,12 +431,18 @@
buffer8[i++] = 0xe0 | (code >>> 12);
buffer8[i++] = 0x80 | ((code >>> 6) &amp; 0x3f);
buffer8[i++] = 0x80 | (code &amp; 0x3f);
} else {
code = 0x10000 + (((code &amp; 0x3ff) &lt;&lt; 10) | (message.charCodeAt(++index) &amp; 0x3ff));
} else if (code &lt; 0xdc00 &amp;&amp; (code2 = message.charCodeAt(index + 1)) >= 0xdc00 &amp;&amp; code2 &lt; 0xe000) {
++index;
code = 0x10000 + (((code &amp; 0x3ff) &lt;&lt; 10) | (code2 &amp; 0x3ff));
buffer8[i++] = 0xf0 | (code >>> 18);
buffer8[i++] = 0x80 | ((code >>> 12) &amp; 0x3f);
buffer8[i++] = 0x80 | ((code >>> 6) &amp; 0x3f);
buffer8[i++] = 0x80 | (code &amp; 0x3f);
} else {
// unpaired surrogate: U+FFFD
buffer8[i++] = 0xef;
buffer8[i++] = 0xbf;
buffer8[i++] = 0xbd;
}
}
} else {
@@ -451,12 +457,18 @@
blocks[i >>> 2] |= (0xe0 | (code >>> 12)) &lt;&lt; SHIFT[i++ &amp; 3];
blocks[i >>> 2] |= (0x80 | ((code >>> 6) &amp; 0x3f)) &lt;&lt; SHIFT[i++ &amp; 3];
blocks[i >>> 2] |= (0x80 | (code &amp; 0x3f)) &lt;&lt; SHIFT[i++ &amp; 3];
} else {
code = 0x10000 + (((code &amp; 0x3ff) &lt;&lt; 10) | (message.charCodeAt(++index) &amp; 0x3ff));
} else if (code &lt; 0xdc00 &amp;&amp; (code2 = message.charCodeAt(index + 1)) >= 0xdc00 &amp;&amp; code2 &lt; 0xe000) {
++index;
code = 0x10000 + (((code &amp; 0x3ff) &lt;&lt; 10) | (code2 &amp; 0x3ff));
blocks[i >>> 2] |= (0xf0 | (code >>> 18)) &lt;&lt; SHIFT[i++ &amp; 3];
blocks[i >>> 2] |= (0x80 | ((code >>> 12) &amp; 0x3f)) &lt;&lt; SHIFT[i++ &amp; 3];
blocks[i >>> 2] |= (0x80 | ((code >>> 6) &amp; 0x3f)) &lt;&lt; SHIFT[i++ &amp; 3];
blocks[i >>> 2] |= (0x80 | (code &amp; 0x3f)) &lt;&lt; SHIFT[i++ &amp; 3];
} else {
// unpaired surrogate: U+FFFD
blocks[i >>> 2] |= 0xef &lt;&lt; SHIFT[i++ &amp; 3];
blocks[i >>> 2] |= 0xbf &lt;&lt; SHIFT[i++ &amp; 3];
blocks[i >>> 2] |= 0xbd &lt;&lt; SHIFT[i++ &amp; 3];
}
}
}
@@ -839,7 +851,7 @@
var i, result = formatMessage(key);
key = result[0];
if (result[1]) {
var bytes = [], length = key.length, index = 0, code;
var bytes = [], length = key.length, index = 0, code, code2;
for (i = 0; i &lt; length; ++i) {
code = key.charCodeAt(i);
if (code &lt; 0x80) {
@@ -851,12 +863,18 @@
bytes[index++] = (0xe0 | (code >>> 12));
bytes[index++] = (0x80 | ((code >>> 6) &amp; 0x3f));
bytes[index++] = (0x80 | (code &amp; 0x3f));
} else {
code = 0x10000 + (((code &amp; 0x3ff) &lt;&lt; 10) | (key.charCodeAt(++i) &amp; 0x3ff));
} else if (code &lt; 0xdc00 &amp;&amp; (code2 = key.charCodeAt(i + 1)) >= 0xdc00 &amp;&amp; code2 &lt; 0xe000) {
++i;
code = 0x10000 + (((code &amp; 0x3ff) &lt;&lt; 10) | (code2 &amp; 0x3ff));
bytes[index++] = (0xf0 | (code >>> 18));
bytes[index++] = (0x80 | ((code >>> 12) &amp; 0x3f));
bytes[index++] = (0x80 | ((code >>> 6) &amp; 0x3f));
bytes[index++] = (0x80 | (code &amp; 0x3f));
} else {
// unpaired surrogate: U+FFFD
bytes[index++] = 0xef;
bytes[index++] = 0xbf;
bytes[index++] = 0xbd;
}
}
key = bytes;
@@ -948,7 +966,7 @@
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a> on Mon Jul 20 2026 10:47:41 GMT+0800 (Taipei Standard Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.5</a>
</footer>
<script> prettyPrint(); </script>
+7
View File
@@ -0,0 +1,7 @@
{
"templates": {
"default": {
"includeDate": false
}
}
}
+88 -639
View File
@@ -1,12 +1,12 @@
{
"name": "js-md5",
"version": "0.9.0",
"version": "0.10.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "js-md5",
"version": "0.9.0",
"version": "0.10.0",
"license": "MIT",
"devDependencies": {
"@rollup/plugin-commonjs": "^29.0.3",
@@ -287,23 +287,12 @@
"node": ">=6.9.0"
}
},
"node_modules/@isaacs/cliui": {
"version": "8.0.2",
"resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz",
"integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==",
"node_modules/@isaacs/nonrecursive-glob-match": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@isaacs/nonrecursive-glob-match/-/nonrecursive-glob-match-1.1.0.tgz",
"integrity": "sha512-GPm/Dbvk5RLmhRnxXIa7nTpK0xtl4E0wj0MslsuNiJ1FIROU+2+9lgUC/dgF7Ey4QCWhfEsgxilMRMCdHPfDfw==",
"dev": true,
"license": "ISC",
"dependencies": {
"string-width": "^5.1.2",
"string-width-cjs": "npm:string-width@^4.2.0",
"strip-ansi": "^7.0.1",
"strip-ansi-cjs": "npm:strip-ansi@^6.0.1",
"wrap-ansi": "^8.1.0",
"wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0"
},
"engines": {
"node": ">=12"
}
"license": "BlueOak-1.0.0"
},
"node_modules/@istanbuljs/load-nyc-config": {
"version": "1.1.0",
@@ -347,9 +336,9 @@
}
},
"node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": {
"version": "3.15.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.15.0.tgz",
"integrity": "sha512-ttBQIIQPDeLjpPOohtUdXuXUVoA2uIB6fEH9HyJ7234s5mBJ5wTx20njxplLZQgLaOfpmPQA7X2t5AX6tIPbog==",
"version": "3.15.2",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.15.2.tgz",
"integrity": "sha512-6EuL879VkRA+1Cz578mKMiKvjPNEuk6+r1JaFzoSWejZmtf7xWbIyw1e3KkxlkzTIt9Taw6JBhEppG7utc1P+w==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -486,17 +475,6 @@
"node": ">=v12.0.0"
}
},
"node_modules/@pkgjs/parseargs": {
"version": "0.11.0",
"resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz",
"integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==",
"dev": true,
"license": "MIT",
"optional": true,
"engines": {
"node": ">=14"
}
},
"node_modules/@rollup/plugin-commonjs": {
"version": "29.0.3",
"resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-29.0.3.tgz",
@@ -979,19 +957,6 @@
"node": ">=8"
}
},
"node_modules/ansi-regex": {
"version": "6.2.2",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz",
"integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/chalk/ansi-regex?sponsor=1"
}
},
"node_modules/ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
@@ -1036,16 +1001,19 @@
"license": "Python-2.0"
},
"node_modules/balanced-match": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",
"integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",
"dev": true,
"license": "MIT"
"license": "MIT",
"engines": {
"node": "18 || 20 || >=22"
}
},
"node_modules/baseline-browser-mapping": {
"version": "2.10.43",
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.43.tgz",
"integrity": "sha512-AjYpR78kDWAY3Efj+cDTFH9t9SCoL7OoTp1BOb0mQV7S+6CiLwnWM3FyxhJtdPufDFKzmCSFoUncKjWgJEZTCQ==",
"version": "2.11.21",
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.21.tgz",
"integrity": "sha512-uh8vpY/1/YyFkunIDFH/12p7/7VdPKA1hejMVEbdkEaWnUz0Hesvx5EbiU6XxjyHZIOju+ZMbQJkRh+es3/spQ==",
"dev": true,
"license": "Apache-2.0",
"bin": {
@@ -1063,13 +1031,16 @@
"license": "MIT"
},
"node_modules/brace-expansion": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.2.tgz",
"integrity": "sha512-w5JZcKgdhDOgOwm8H+KgbosopHMuGcl6qbulwjtz3SM7I7P3yW1eAjzMPLrIE+NQ9vjgANKHWeMHnrT0OXW1oA==",
"version": "5.0.13",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.13.tgz",
"integrity": "sha512-Vh3dmFbc4wZeox7M9I/0L9GfFd83Su4+yCck/OF9Gi/P/dAHn0RT7X4K9R7gMNMhDck3DvhR6QXsnQdjjgwNvQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"balanced-match": "^1.0.0"
"balanced-match": "^4.0.2"
},
"engines": {
"node": "20 || >=22"
}
},
"node_modules/browser-stdout": {
@@ -1080,9 +1051,9 @@
"license": "ISC"
},
"node_modules/browserslist": {
"version": "4.28.6",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.6.tgz",
"integrity": "sha512-FQBYNK15VMslhLHpA7+n+n1GOlF1kId2xcCg7/j95f24AOF6VDYMNH4mFxF7KuaTdv627faazpOAjFzMrfJOUw==",
"version": "4.28.9",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.9.tgz",
"integrity": "sha512-EWazOblFYUvlGZcfGhPUPmYh3nikUxBVb+y9MJun5f3hBi812X+8MSQTujLBtgK3cf51fJWbWfOjyeO954d+Eg==",
"dev": true,
"funding": [
{
@@ -1100,11 +1071,11 @@
],
"license": "MIT",
"dependencies": {
"baseline-browser-mapping": "^2.10.42",
"caniuse-lite": "^1.0.30001803",
"electron-to-chromium": "^1.5.389",
"node-releases": "^2.0.51",
"update-browserslist-db": "^1.2.3"
"baseline-browser-mapping": "^2.11.20",
"caniuse-lite": "^1.0.30001810",
"electron-to-chromium": "^1.5.420",
"node-releases": "^2.0.54",
"update-browserslist-db": "^1.3.2"
},
"bin": {
"browserslist": "cli.js"
@@ -1147,9 +1118,9 @@
}
},
"node_modules/caniuse-lite": {
"version": "1.0.30001806",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001806.tgz",
"integrity": "sha512-72Cuvd95zbSYPKq6Fhg8eDJRlzgWDf7/mtoZv6Qe/DYNCEBdNxoA3+rZAU2ZhGCpZlns3EssFavaZomckT5Uuw==",
"version": "1.0.30001810",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001810.tgz",
"integrity": "sha512-TITQPUkaz+aVk5GL6NhOdwk1aEaNTSDPsGFWrTuhKGtjTF70jL/Oht2W4c6rXUe5fu7Ie19VIahAXHIIiWWNeg==",
"dev": true,
"funding": [
{
@@ -1415,36 +1386,22 @@
}
},
"node_modules/diff": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/diff/-/diff-7.0.0.tgz",
"integrity": "sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==",
"version": "8.0.4",
"resolved": "https://registry.npmjs.org/diff/-/diff-8.0.4.tgz",
"integrity": "sha512-DPi0FmjiSU5EvQV0++GFDOJ9ASQUVFh5kD+OzOnYdi7n3Wpm9hWWGfB/O2blfHcMVTL5WkQXSnRiK9makhrcnw==",
"dev": true,
"license": "BSD-3-Clause",
"engines": {
"node": ">=0.3.1"
}
},
"node_modules/eastasianwidth": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",
"integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==",
"dev": true,
"license": "MIT"
},
"node_modules/electron-to-chromium": {
"version": "1.5.393",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.393.tgz",
"integrity": "sha512-kiDJdIUawuEIcp9XoICKp1iTYDEbgguIPq526N1Q7jIQDeQ3CqoMx71025PI/7E48Ddtw2HuWsVjY7afEgNxmg==",
"version": "1.5.422",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.422.tgz",
"integrity": "sha512-UvA/32XqrLDdZSn7Jllo1AYNcWji/G0d5M0GTViE7KoGBiMunw3a34Sb2KO4ZZyrSEhqsxFoVhWWJshdyfKqJA==",
"dev": true,
"license": "ISC"
},
"node_modules/emoji-regex": {
"version": "9.2.2",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
"integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
"dev": true,
"license": "MIT"
},
"node_modules/entities": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz",
@@ -1669,22 +1626,18 @@
}
},
"node_modules/glob": {
"version": "10.5.0",
"resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz",
"integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==",
"deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me",
"version": "14.0.6",
"resolved": "https://registry.npmjs.org/glob/-/glob-14.0.6.tgz",
"integrity": "sha512-OwXjVP2svY5EyLY75Vek96C8qK43gqrt4xsZ+qSILdnaEiJPXkd62mcfUSNx/TQErQRdu5uM5kF67sfONragKw==",
"dev": true,
"license": "ISC",
"license": "BlueOak-1.0.0",
"dependencies": {
"foreground-child": "^3.1.0",
"jackspeak": "^3.1.2",
"minimatch": "^9.0.4",
"minipass": "^7.1.2",
"package-json-from-dist": "^1.0.0",
"path-scurry": "^1.11.1"
"minimatch": "^11.0.5",
"minipass": "^7.1.3",
"path-scurry": "^3.0.0"
},
"bin": {
"glob": "dist/esm/bin.mjs"
"engines": {
"node": "18 || 20 || >=22"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
@@ -1981,22 +1934,6 @@
"node": ">=8"
}
},
"node_modules/jackspeak": {
"version": "3.4.3",
"resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz",
"integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==",
"dev": true,
"license": "BlueOak-1.0.0",
"dependencies": {
"@isaacs/cliui": "^8.0.2"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
},
"optionalDependencies": {
"@pkgjs/parseargs": "^0.11.0"
}
},
"node_modules/js-tokens": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
@@ -2005,9 +1942,9 @@
"license": "MIT"
},
"node_modules/js-yaml": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.0.tgz",
"integrity": "sha512-1td788aAnnZ5qs7V2QIRl1owjtYpbKt749Y3xauqQgwIIGF/xXWz1wMTEBx5O3LK3lXLVuqXPdPxj2BoFHaW9Q==",
"version": "4.3.2",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.2.tgz",
"integrity": "sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==",
"dev": true,
"funding": [
{
@@ -2217,9 +2154,9 @@
}
},
"node_modules/markdown-it": {
"version": "14.3.0",
"resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.3.0.tgz",
"integrity": "sha512-RCEsPjR+sr0x+AuYp601tKTkgFG4YEPLCzHST3cQ/fhlJkqAkz1L2/Qbp1j9qw5SBwQHFBoW8+hoN5xssOF0Tw==",
"version": "14.3.3",
"resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.3.3.tgz",
"integrity": "sha512-L//tDAkjTjJCU6pBUSBTgs3Kg4InVaZuUZog/b6V12UKhcDQ7S78877ibbCanRExwPuYP1CZD7Gd2dxSy1GXRg==",
"dev": true,
"funding": [
{
@@ -2276,16 +2213,17 @@
"license": "MIT"
},
"node_modules/minimatch": {
"version": "9.0.9",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz",
"integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==",
"version": "11.0.8",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-11.0.8.tgz",
"integrity": "sha512-nFQuYSTVrGvysVBps5Ih+0BdnYFN/Cj3C816r6+p7yK+FHrVLGE4O4N9AFwykrlNlvM2HYt+Rad1Uiro6h88Ig==",
"dev": true,
"license": "ISC",
"license": "BlueOak-1.0.0",
"dependencies": {
"brace-expansion": "^2.0.2"
"@isaacs/nonrecursive-glob-match": "^1.1.0",
"brace-expansion": "^5.0.12"
},
"engines": {
"node": ">=16 || 14 >=14.17"
"node": "20 || >=22"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
@@ -2364,16 +2302,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/mocha/node_modules/serialize-javascript": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz",
"integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==",
"dev": true,
"license": "BSD-3-Clause",
"dependencies": {
"randombytes": "^2.1.0"
}
},
"node_modules/ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
@@ -2395,9 +2323,9 @@
}
},
"node_modules/node-releases": {
"version": "2.0.51",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.51.tgz",
"integrity": "sha512-wRNIrw4DmVLKQlbgOMdkMx27Wrpzes2hh5Jtbi2bjPd+4wJstWIqP5A+lscnqbm0xxmT5Bpg8Lec5ItEBwx6BQ==",
"version": "2.0.54",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.54.tgz",
"integrity": "sha512-YHs7BmmcsdAI5Ozuf8JZo6PT0mv2GIWC9vMfvUC3dp65M8hn7Ux8CPL+2oBI7juNuj9d0ndhTcznq2ODBps9cQ==",
"dev": true,
"license": "MIT",
"engines": {
@@ -2456,29 +2384,6 @@
"node": ">=8"
}
},
"node_modules/nyc/node_modules/balanced-match": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",
"integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",
"dev": true,
"license": "MIT",
"engines": {
"node": "18 || 20 || >=22"
}
},
"node_modules/nyc/node_modules/brace-expansion": {
"version": "5.0.7",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.7.tgz",
"integrity": "sha512-7oFy703dxfY3/NLxC1fh2SUCQ0H9rmAY+5EpDVfXjUTTs+HEwR2nYaqLv+GWcTsumwxPfiz6CzCNkwXwBUwqCA==",
"dev": true,
"license": "MIT",
"dependencies": {
"balanced-match": "^4.0.2"
},
"engines": {
"node": "18 || 20 || >=22"
}
},
"node_modules/nyc/node_modules/cliui": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz",
@@ -2512,24 +2417,6 @@
"node": ">=8"
}
},
"node_modules/nyc/node_modules/glob": {
"version": "13.0.6",
"resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz",
"integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==",
"dev": true,
"license": "BlueOak-1.0.0",
"dependencies": {
"minimatch": "^10.2.2",
"minipass": "^7.1.3",
"path-scurry": "^2.0.2"
},
"engines": {
"node": "18 || 20 || >=22"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/nyc/node_modules/locate-path": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
@@ -2543,32 +2430,6 @@
"node": ">=8"
}
},
"node_modules/nyc/node_modules/lru-cache": {
"version": "11.5.2",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.2.tgz",
"integrity": "sha512-4pfM1Ff0x50o0tQwb5ucw/RzNyD0/YJME6IVcStalZuMWxdt3sR3huStTtxz4PUmvZfRguvDejasvQ2kifR11g==",
"dev": true,
"license": "BlueOak-1.0.0",
"engines": {
"node": "20 || >=22"
}
},
"node_modules/nyc/node_modules/minimatch": {
"version": "10.2.5",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz",
"integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==",
"dev": true,
"license": "BlueOak-1.0.0",
"dependencies": {
"brace-expansion": "^5.0.5"
},
"engines": {
"node": "18 || 20 || >=22"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/nyc/node_modules/p-limit": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
@@ -2598,23 +2459,6 @@
"node": ">=8"
}
},
"node_modules/nyc/node_modules/path-scurry": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz",
"integrity": "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==",
"dev": true,
"license": "BlueOak-1.0.0",
"dependencies": {
"lru-cache": "^11.0.0",
"minipass": "^7.1.2"
},
"engines": {
"node": "18 || 20 || >=22"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/nyc/node_modules/signal-exit": {
"version": "3.0.7",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
@@ -2808,28 +2652,31 @@
}
},
"node_modules/path-scurry": {
"version": "1.11.1",
"resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz",
"integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==",
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-3.0.0.tgz",
"integrity": "sha512-1pTbQqH1wIwMi/eleQ5leFTTCkzFsPcgXNjwOA8YGGW/W4/kHT3dssE7Z6NH+zuqNLOzOB0uaD61yl7cAcVhgg==",
"dev": true,
"license": "BlueOak-1.0.0",
"dependencies": {
"lru-cache": "^10.2.0",
"minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"
"lru-cache": "^11.0.0",
"minipass": "^7.1.2"
},
"engines": {
"node": ">=16 || 14 >=14.18"
"node": "18 || 20 || >=22"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/path-scurry/node_modules/lru-cache": {
"version": "10.4.3",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz",
"integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==",
"version": "11.5.3",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.3.tgz",
"integrity": "sha512-U4N8FgzmWxc8k1VH8Kr6lQg18U7Fjvby6wXHVRX/ZZ7IwWbRMgrRbP0Wrb5q5NVinryp4SQampHKdvtecItxUg==",
"dev": true,
"license": "ISC"
"license": "BlueOak-1.0.0",
"engines": {
"node": "20 || >=22"
}
},
"node_modules/picocolors": {
"version": "1.1.1",
@@ -2943,16 +2790,6 @@
"node": ">=6"
}
},
"node_modules/randombytes": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
"integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"safe-buffer": "^5.1.0"
}
},
"node_modules/readdirp": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz",
@@ -3051,90 +2888,6 @@
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/rimraf/node_modules/balanced-match": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",
"integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",
"dev": true,
"license": "MIT",
"engines": {
"node": "18 || 20 || >=22"
}
},
"node_modules/rimraf/node_modules/brace-expansion": {
"version": "5.0.7",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.7.tgz",
"integrity": "sha512-7oFy703dxfY3/NLxC1fh2SUCQ0H9rmAY+5EpDVfXjUTTs+HEwR2nYaqLv+GWcTsumwxPfiz6CzCNkwXwBUwqCA==",
"dev": true,
"license": "MIT",
"dependencies": {
"balanced-match": "^4.0.2"
},
"engines": {
"node": "18 || 20 || >=22"
}
},
"node_modules/rimraf/node_modules/glob": {
"version": "13.0.6",
"resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz",
"integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==",
"dev": true,
"license": "BlueOak-1.0.0",
"dependencies": {
"minimatch": "^10.2.2",
"minipass": "^7.1.3",
"path-scurry": "^2.0.2"
},
"engines": {
"node": "18 || 20 || >=22"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/rimraf/node_modules/lru-cache": {
"version": "11.5.2",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.2.tgz",
"integrity": "sha512-4pfM1Ff0x50o0tQwb5ucw/RzNyD0/YJME6IVcStalZuMWxdt3sR3huStTtxz4PUmvZfRguvDejasvQ2kifR11g==",
"dev": true,
"license": "BlueOak-1.0.0",
"engines": {
"node": "20 || >=22"
}
},
"node_modules/rimraf/node_modules/minimatch": {
"version": "10.2.5",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz",
"integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==",
"dev": true,
"license": "BlueOak-1.0.0",
"dependencies": {
"brace-expansion": "^5.0.5"
},
"engines": {
"node": "18 || 20 || >=22"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/rimraf/node_modules/path-scurry": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz",
"integrity": "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==",
"dev": true,
"license": "BlueOak-1.0.0",
"dependencies": {
"lru-cache": "^11.0.0",
"minipass": "^7.1.2"
},
"engines": {
"node": "18 || 20 || >=22"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/rollup": {
"version": "4.62.2",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.62.2.tgz",
@@ -3180,27 +2933,6 @@
"fsevents": "~2.3.2"
}
},
"node_modules/safe-buffer": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
"dev": true,
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
],
"license": "MIT"
},
"node_modules/semver": {
"version": "7.8.5",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz",
@@ -3215,9 +2947,9 @@
}
},
"node_modules/serialize-javascript": {
"version": "7.0.7",
"resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-7.0.7.tgz",
"integrity": "sha512-YAy8Od6KV+uuwUuU50np8fGB/Aues6Y0nAhA9y/hId74PlKUcme4pXcBD46NWKr1Q4osN/iseZ17YqO1XfmI8g==",
"version": "7.1.4",
"resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-7.1.4.tgz",
"integrity": "sha512-FqlEuoTq/zRmA4Lg6aOqyH3lCHbUtCB0bmHCeFniX2GBdDqMJM3FwdvEhlE5Pim1dlt2FfBdVPmUNNiGhhKqpw==",
"dev": true,
"license": "BSD-3-Clause",
"engines": {
@@ -3345,110 +3077,6 @@
"dev": true,
"license": "BSD-3-Clause"
},
"node_modules/string-width": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
"integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
"dev": true,
"license": "MIT",
"dependencies": {
"eastasianwidth": "^0.2.0",
"emoji-regex": "^9.2.2",
"strip-ansi": "^7.0.1"
},
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/string-width-cjs": {
"name": "string-width",
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
"dev": true,
"license": "MIT",
"dependencies": {
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
"strip-ansi": "^6.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/string-width-cjs/node_modules/ansi-regex": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/string-width-cjs/node_modules/emoji-regex": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
"dev": true,
"license": "MIT"
},
"node_modules/string-width-cjs/node_modules/strip-ansi": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
"dev": true,
"license": "MIT",
"dependencies": {
"ansi-regex": "^5.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/strip-ansi": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz",
"integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==",
"dev": true,
"license": "MIT",
"dependencies": {
"ansi-regex": "^6.2.2"
},
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/chalk/strip-ansi?sponsor=1"
}
},
"node_modules/strip-ansi-cjs": {
"name": "strip-ansi",
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
"dev": true,
"license": "MIT",
"dependencies": {
"ansi-regex": "^5.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/strip-ansi-cjs/node_modules/ansi-regex": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/strip-bom": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz",
@@ -3522,90 +3150,6 @@
"node": "20 || >=22"
}
},
"node_modules/test-exclude/node_modules/balanced-match": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz",
"integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==",
"dev": true,
"license": "MIT",
"engines": {
"node": "18 || 20 || >=22"
}
},
"node_modules/test-exclude/node_modules/brace-expansion": {
"version": "5.0.7",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.7.tgz",
"integrity": "sha512-7oFy703dxfY3/NLxC1fh2SUCQ0H9rmAY+5EpDVfXjUTTs+HEwR2nYaqLv+GWcTsumwxPfiz6CzCNkwXwBUwqCA==",
"dev": true,
"license": "MIT",
"dependencies": {
"balanced-match": "^4.0.2"
},
"engines": {
"node": "18 || 20 || >=22"
}
},
"node_modules/test-exclude/node_modules/glob": {
"version": "13.0.6",
"resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz",
"integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==",
"dev": true,
"license": "BlueOak-1.0.0",
"dependencies": {
"minimatch": "^10.2.2",
"minipass": "^7.1.3",
"path-scurry": "^2.0.2"
},
"engines": {
"node": "18 || 20 || >=22"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/test-exclude/node_modules/lru-cache": {
"version": "11.5.2",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.2.tgz",
"integrity": "sha512-4pfM1Ff0x50o0tQwb5ucw/RzNyD0/YJME6IVcStalZuMWxdt3sR3huStTtxz4PUmvZfRguvDejasvQ2kifR11g==",
"dev": true,
"license": "BlueOak-1.0.0",
"engines": {
"node": "20 || >=22"
}
},
"node_modules/test-exclude/node_modules/minimatch": {
"version": "10.2.5",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz",
"integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==",
"dev": true,
"license": "BlueOak-1.0.0",
"dependencies": {
"brace-expansion": "^5.0.5"
},
"engines": {
"node": "18 || 20 || >=22"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/test-exclude/node_modules/path-scurry": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz",
"integrity": "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==",
"dev": true,
"license": "BlueOak-1.0.0",
"dependencies": {
"lru-cache": "^11.0.0",
"minipass": "^7.1.2"
},
"engines": {
"node": "18 || 20 || >=22"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/tiny-worker": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/tiny-worker/-/tiny-worker-2.3.0.tgz",
@@ -3651,9 +3195,9 @@
"license": "MIT"
},
"node_modules/update-browserslist-db": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz",
"integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==",
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.3.2.tgz",
"integrity": "sha512-UQ+MSxlhRm1bzjhU+DcuXfjFO1FzNtqhK5+9Yvlp90ItDLk5vT932A0rFu619nf7RVS+Y/VeaUW1jaRDqZ8VJw==",
"dev": true,
"funding": [
{
@@ -3711,101 +3255,6 @@
"dev": true,
"license": "Apache-2.0"
},
"node_modules/wrap-ansi": {
"version": "8.1.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz",
"integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"ansi-styles": "^6.1.0",
"string-width": "^5.0.1",
"strip-ansi": "^7.0.1"
},
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/chalk/wrap-ansi?sponsor=1"
}
},
"node_modules/wrap-ansi-cjs": {
"name": "wrap-ansi",
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
"integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
"dev": true,
"license": "MIT",
"dependencies": {
"ansi-styles": "^4.0.0",
"string-width": "^4.1.0",
"strip-ansi": "^6.0.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/chalk/wrap-ansi?sponsor=1"
}
},
"node_modules/wrap-ansi-cjs/node_modules/ansi-regex": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/wrap-ansi-cjs/node_modules/emoji-regex": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
"dev": true,
"license": "MIT"
},
"node_modules/wrap-ansi-cjs/node_modules/string-width": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
"dev": true,
"license": "MIT",
"dependencies": {
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
"strip-ansi": "^6.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/wrap-ansi-cjs/node_modules/strip-ansi": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
"dev": true,
"license": "MIT",
"dependencies": {
"ansi-regex": "^5.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/wrap-ansi/node_modules/ansi-styles": {
"version": "6.2.3",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz",
"integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
}
},
"node_modules/write-file-atomic": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz",
+11 -6
View File
@@ -1,6 +1,6 @@
{
"name": "js-md5",
"version": "0.9.0",
"version": "0.10.0",
"description": "A simple MD5 hash function for JavaScript supports UTF-8 encoding.",
"main": "src/md5.js",
"module": "build/md5.mjs",
@@ -46,12 +46,11 @@
"tiny-worker": "^2.3.0"
},
"scripts": {
"test": "npm run compress && nyc mocha tests/node-test.js && node tests/build-test.js && node tests/esm-test.mjs",
"test": "nyc mocha tests/node-test.js && node tests/build-test.js && node tests/esm-test.mjs",
"report": "nyc --reporter=html --reporter=text mocha tests/node-test.js",
"coveralls": "nyc report --reporter=text-lcov | coveralls",
"doc": "rm -rf doc;jsdoc src README.md -d doc",
"compress": "rollup -c",
"build": "npm run-script compress;npm run-script doc"
"coverage": "nyc report --reporter=text-lcov > coverage.lcov",
"doc": "rm -rf doc && jsdoc -c jsdoc.json src README.md -d doc",
"build": "rollup -c && npm run doc"
},
"repository": {
"type": "git",
@@ -78,5 +77,11 @@
"browser": {
"crypto": false,
"buffer": false
},
"overrides": {
"diff": "^8.0.3",
"glob": "^14.0.2",
"minimatch": "^11.0.1",
"serialize-javascript": "^7.1.3"
}
}
+27 -9
View File
@@ -2,7 +2,7 @@
* [js-md5]{@link https://github.com/emn178/js-md5}
*
* @namespace md5
* @version 0.9.0
* @version 0.10.0
* @author Chen, Yi-Cyuan [emn178@gmail.com]
* @copyright Chen, Yi-Cyuan 2014-2026
* @license MIT
@@ -377,7 +377,7 @@
var result = formatMessage(message);
message = result[0];
var isString = result[1];
var code, index = 0, i, length = message.length, blocks = this.blocks;
var code, code2, index = 0, i, length = message.length, blocks = this.blocks;
var buffer8 = this.buffer8;
while (index < length) {
@@ -403,12 +403,18 @@
buffer8[i++] = 0xe0 | (code >>> 12);
buffer8[i++] = 0x80 | ((code >>> 6) & 0x3f);
buffer8[i++] = 0x80 | (code & 0x3f);
} else {
code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));
} else if (code < 0xdc00 && (code2 = message.charCodeAt(index + 1)) >= 0xdc00 && code2 < 0xe000) {
++index;
code = 0x10000 + (((code & 0x3ff) << 10) | (code2 & 0x3ff));
buffer8[i++] = 0xf0 | (code >>> 18);
buffer8[i++] = 0x80 | ((code >>> 12) & 0x3f);
buffer8[i++] = 0x80 | ((code >>> 6) & 0x3f);
buffer8[i++] = 0x80 | (code & 0x3f);
} else {
// unpaired surrogate: U+FFFD
buffer8[i++] = 0xef;
buffer8[i++] = 0xbf;
buffer8[i++] = 0xbd;
}
}
} else {
@@ -423,12 +429,18 @@
blocks[i >>> 2] |= (0xe0 | (code >>> 12)) << SHIFT[i++ & 3];
blocks[i >>> 2] |= (0x80 | ((code >>> 6) & 0x3f)) << SHIFT[i++ & 3];
blocks[i >>> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];
} else {
code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));
} else if (code < 0xdc00 && (code2 = message.charCodeAt(index + 1)) >= 0xdc00 && code2 < 0xe000) {
++index;
code = 0x10000 + (((code & 0x3ff) << 10) | (code2 & 0x3ff));
blocks[i >>> 2] |= (0xf0 | (code >>> 18)) << SHIFT[i++ & 3];
blocks[i >>> 2] |= (0x80 | ((code >>> 12) & 0x3f)) << SHIFT[i++ & 3];
blocks[i >>> 2] |= (0x80 | ((code >>> 6) & 0x3f)) << SHIFT[i++ & 3];
blocks[i >>> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];
} else {
// unpaired surrogate: U+FFFD
blocks[i >>> 2] |= 0xef << SHIFT[i++ & 3];
blocks[i >>> 2] |= 0xbf << SHIFT[i++ & 3];
blocks[i >>> 2] |= 0xbd << SHIFT[i++ & 3];
}
}
}
@@ -811,7 +823,7 @@
var i, result = formatMessage(key);
key = result[0];
if (result[1]) {
var bytes = [], length = key.length, index = 0, code;
var bytes = [], length = key.length, index = 0, code, code2;
for (i = 0; i < length; ++i) {
code = key.charCodeAt(i);
if (code < 0x80) {
@@ -823,12 +835,18 @@
bytes[index++] = (0xe0 | (code >>> 12));
bytes[index++] = (0x80 | ((code >>> 6) & 0x3f));
bytes[index++] = (0x80 | (code & 0x3f));
} else {
code = 0x10000 + (((code & 0x3ff) << 10) | (key.charCodeAt(++i) & 0x3ff));
} else if (code < 0xdc00 && (code2 = key.charCodeAt(i + 1)) >= 0xdc00 && code2 < 0xe000) {
++i;
code = 0x10000 + (((code & 0x3ff) << 10) | (code2 & 0x3ff));
bytes[index++] = (0xf0 | (code >>> 18));
bytes[index++] = (0x80 | ((code >>> 12) & 0x3f));
bytes[index++] = (0x80 | ((code >>> 6) & 0x3f));
bytes[index++] = (0x80 | (code & 0x3f));
} else {
// unpaired surrogate: U+FFFD
bytes[index++] = 0xef;
bytes[index++] = 0xbf;
bytes[index++] = 0xbd;
}
}
key = bytes;
+4
View File
@@ -45,6 +45,10 @@
'05fe3b294344f4e93c811e10f9825a38': ['中文', '中文'],
'c1bc6df91f38e6332b8562324005103d': ['aécio', 'aécio'],
'14eef78533c35078177d11fb4593a19e': ['𠜎', '𠜎']
},
'UTF8 unpaired surrogates': {
'2ef4c67742d4f436cbdfdbad133659af': ['\ud800', 'a\ud83db'],
'f537b6e97a3e8b23a9e87a29fb5c4173': ['a\udc00b', '\ud83d\ude00\udfff']
}
}
};
+10
View File
@@ -27,6 +27,16 @@
'edce615b179e6e29be23145b77ebbd61': '訊息摘要演算法第五版(英語:Message-Digest Algorithm 5,縮寫為MD5),是當前電腦領域用於確保資訊傳輸完整一致而廣泛使用的雜湊演算法之一',
'ad36c9ab669a0ba9ce46d3ce9134de34': '訊息摘要演算法第五版(英語:Message-Digest Algorithm 5,縮寫為MD5),是當前電腦領域用於確保資訊傳輸完整一致而廣泛使用的雜湊演算法之一(又譯雜湊演算法、摘要演算法等),主流程式語言普遍已有MD5的實作。'
},
'UTF8 unpaired surrogates': {
'9b759040321a408a5c7768b4511287a6': '\ud800',
'e240e5e976deb550ea69ec12f01d19ea': '\udc00x',
'ff6405018d5ab2642e35fdba389b7c51': 'a\ud83db',
'ef175e9b596d296034dda690087252f8': 'a\udc00',
'2e906629739ba554e03c1201e05b94f2': '\ud83d\ud83d\ude00',
'468a7f02af0808ae39ef3e3629ae048c': '\ud83d\ude00\udfff',
'6785af8cb378bd9950085c5d6375f9ad': Array(57).join('0') + '\ud800',
'a20fb4cd303a71aa61dd524e8fc525ef': Array(64).join('0') + '\ud800b'
},
'special length': {
'a119de63e4b2398427da06dd780263b3': '0123456780123456780123456780123456780123456780123456780',
'ddafd84ebe63aebc4626b037a569d78b': '01234567801234567801234567801234567801234567801234567801',