Files
js-sha256/package.json
T
Yi-Cyuan ChenandClaude Opus 5.5 91494a72ab ### Fixed
- Unpaired UTF-16 surrogates in string input (including HMAC keys) produced wrong digests and consumed the following code unit in the browser/core implementation. They are now encoded as U+FFFD, matching `TextEncoder` and the Node.js implementation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 10:22:20 +08:00

66 lines
2.0 KiB
JSON

{
"name": "js-sha256",
"version": "1.0.1",
"description": "A simple SHA-256 / SHA-224 hash function for JavaScript supports UTF-8 encoding.",
"main": "build/sha256.node.cjs",
"module": "src/index.mjs",
"exports": {
".": {
"types": "./index.d.ts",
"node": {
"import": "./src/node.mjs",
"require": "./build/sha256.node.cjs"
},
"import": "./src/index.mjs",
"require": "./build/sha256.cjs",
"default": "./src/index.mjs"
},
"./src/sha256.js": "./build/sha256.js",
"./build/sha256.js": "./build/sha256.js",
"./build/sha256.cjs": "./build/sha256.cjs",
"./build/sha256.min.js": "./build/sha256.min.js",
"./build/sha256.min.mjs": "./build/sha256.min.mjs",
"./build/sha256.node.cjs": "./build/sha256.node.cjs",
"./package.json": "./package.json"
},
"types": "./index.d.ts",
"devDependencies": {
"@playwright/test": "^1.62.0",
"@rollup/plugin-terser": "^1.0.0",
"c8": "^8.0.1",
"mocha": "~10.8.2",
"rollup": "^4.43.0"
},
"scripts": {
"test": "npm run build && npm run test:coverage",
"test:unit": "mocha tests/core-test.mjs && mocha tests/node-test.mjs",
"test:dist": "node tests/dist-test.mjs",
"test:runtime": "npm run test:unit && npm run test:dist",
"test:coverage": "c8 --all --include=src/shared.mjs --include=src/core.mjs --include=src/node.mjs --reporter=text --reporter=html --reporter=lcov npm run test:runtime",
"test:browser": "playwright test",
"build": "rollup -c",
"prepack": "npm run build"
},
"repository": {
"type": "git",
"url": "https://github.com/emn178/js-sha256.git"
},
"keywords": [
"sha",
"sha2",
"sha224",
"sha256",
"hash",
"encryption",
"cryptography",
"HMAC"
],
"license": "MIT",
"author": "Chen, Yi-Cyuan <emn178@gmail.com>",
"homepage": "https://github.com/emn178/js-sha256",
"bugs": {
"url": "https://github.com/emn178/js-sha256/issues"
},
"browser": "build/sha256.cjs"
}