### Added

- TypeScript interfaces. #6, #9
- HMAC feature.
- support for web worker. #14

### Fixed
- deprecated `new Buffer`, replace with `Buffer.from`. #10
- dependencies and security issues.
- refactor: simplify formatMessage internal logic.
- Generates incorrect hash in some cases.

### Changed
- remove `eval` and use `require` directly. #8
- throw error by Error oject.
- throw error if update after finalize
- use unsigned right shift.
This commit is contained in:
Yi-Cyuan Chen
2024-01-24 11:31:08 +08:00
parent 4818f116e4
commit 33acf62431
15 changed files with 905 additions and 126 deletions
+6 -1
View File
@@ -1,6 +1,6 @@
{
"name": "js-sha1",
"version": "0.6.0",
"version": "0.7.0",
"description": "A simple SHA1 hash function for JavaScript supports UTF-8 encoding.",
"main": "src/sha1.js",
"devDependencies": {
@@ -8,6 +8,7 @@
"mocha": "~10.2.0",
"nyc": "^15.1.0",
"requirejs": "^2.1.22",
"tiny-worker": "^2.3.0",
"uglify-js": "^3.1.9"
},
"scripts": {
@@ -37,5 +38,9 @@
"exclude": [
"tests"
]
},
"browser": {
"crypto": false,
"buffer": false
}
}