### Fixed

- Incorrect hash for `DataView` input.
- Throws `ArrayBuffer is not defined` in browsers without `ArrayBuffer`.

### Changed
- Multi-byte typed arrays such as `Uint16Array`, `Uint32Array` and `Float32Array` are now hashed by their underlying bytes, the same as Node.js `crypto` and Web Crypto. Previously each element was treated as one byte.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Yi-Cyuan Chen
2026-11-18 13:31:55 +08:00
co-authored by Claude Opus 5.5
parent c2a7870840
commit 66db5dbd99
31 changed files with 186 additions and 103 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "js-md5",
"version": "0.10.0",
"version": "0.11.0",
"description": "A simple MD5 hash function for JavaScript supports UTF-8 encoding.",
"main": "src/md5.js",
"module": "build/md5.mjs",