js-md5 0.8.0 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/README.md +11 -1
- package/index.d.ts +20 -0
- package/package.json +6 -2
- package/src/md5.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## v0.8.2 / 2023-10-09
|
|
4
|
+
### Remove
|
|
5
|
+
- package.json module property.
|
|
6
|
+
|
|
7
|
+
## v0.8.1 / 2023-10-09
|
|
8
|
+
### Added
|
|
9
|
+
- TypeScript base64 interfaces.
|
|
10
|
+
- Disable webpack polyfill.
|
|
11
|
+
|
|
3
12
|
## v0.8.0 / 2023-09-27
|
|
4
13
|
### Added
|
|
5
14
|
- TypeScript interfaces.
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[](https://coveralls.io/r/emn178/js-md5?branch=master)
|
|
4
4
|
[](https://nodei.co/npm/js-md5/)
|
|
5
5
|
|
|
6
|
-
A simple MD5 hash function for JavaScript supports UTF-8 encoding.
|
|
6
|
+
A simple and fast MD5 hash function for JavaScript supports UTF-8 encoding.
|
|
7
7
|
|
|
8
8
|
## Demo
|
|
9
9
|
[MD5 Online](http://emn178.github.io/online-tools/md5.html)
|
|
@@ -13,6 +13,10 @@ A simple MD5 hash function for JavaScript supports UTF-8 encoding.
|
|
|
13
13
|
[Compress](https://raw.github.com/emn178/js-md5/master/build/md5.min.js)
|
|
14
14
|
[Uncompress](https://raw.github.com/emn178/js-md5/master/src/md5.js)
|
|
15
15
|
|
|
16
|
+
## Benchmark
|
|
17
|
+
[jsPerf Benchmark](https://jsperf.app/jonuhi)
|
|
18
|
+
[File Benchmark](https://github.com/emn178/js-md5/issues/19)
|
|
19
|
+
|
|
16
20
|
## Installation
|
|
17
21
|
You can also install js-md5 by using Bower.
|
|
18
22
|
|
|
@@ -47,6 +51,12 @@ If you use node.js, you should require the module first:
|
|
|
47
51
|
var md5 = require('js-md5');
|
|
48
52
|
```
|
|
49
53
|
|
|
54
|
+
### TypeScript
|
|
55
|
+
If you use TypeScript, you can import like this:
|
|
56
|
+
```TypeScript
|
|
57
|
+
import { md5 } from 'js-md5';
|
|
58
|
+
```
|
|
59
|
+
|
|
50
60
|
## RequireJS
|
|
51
61
|
It supports AMD:
|
|
52
62
|
```JavaScript
|
package/index.d.ts
CHANGED
|
@@ -32,6 +32,11 @@ interface Hasher {
|
|
|
32
32
|
* Return hash in integer array.
|
|
33
33
|
*/
|
|
34
34
|
array(): number[];
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Return hash in base64 string.
|
|
38
|
+
*/
|
|
39
|
+
base64(): string;
|
|
35
40
|
}
|
|
36
41
|
|
|
37
42
|
interface Hmac {
|
|
@@ -89,6 +94,14 @@ interface Hmac {
|
|
|
89
94
|
* @param message The message you want to hash.
|
|
90
95
|
*/
|
|
91
96
|
array(secretKey: Message, message: Message): number[];
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Return hash in base64 string.
|
|
100
|
+
*
|
|
101
|
+
* @param secretKey The Secret Key
|
|
102
|
+
* @param message The message you want to hash.
|
|
103
|
+
*/
|
|
104
|
+
base64(secretKey: Message, message: Message): string;
|
|
92
105
|
}
|
|
93
106
|
|
|
94
107
|
interface Hash {
|
|
@@ -139,6 +152,13 @@ interface Hash {
|
|
|
139
152
|
*/
|
|
140
153
|
array(message: Message): number[];
|
|
141
154
|
|
|
155
|
+
/**
|
|
156
|
+
* Return hash in base64 string.
|
|
157
|
+
*
|
|
158
|
+
* @param message The message you want to hash.
|
|
159
|
+
*/
|
|
160
|
+
base64(message: Message): string;
|
|
161
|
+
|
|
142
162
|
/**
|
|
143
163
|
* HMAC interface
|
|
144
164
|
*/
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "js-md5",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"description": "A simple MD5 hash function for JavaScript supports UTF-8 encoding.",
|
|
5
|
-
"main": "
|
|
5
|
+
"main": "build/md5.min.js",
|
|
6
6
|
"devDependencies": {
|
|
7
7
|
"expect.js": "~0.3.1",
|
|
8
8
|
"jsdoc": "~4.0.2",
|
|
@@ -41,5 +41,9 @@
|
|
|
41
41
|
"exclude": [
|
|
42
42
|
"tests"
|
|
43
43
|
]
|
|
44
|
+
},
|
|
45
|
+
"browser": {
|
|
46
|
+
"crypto": false,
|
|
47
|
+
"buffer": false
|
|
44
48
|
}
|
|
45
49
|
}
|