js-md5 0.7.2 → 0.8.0

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.
Files changed (48) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/LICENSE.txt +1 -1
  3. package/README.md +18 -2
  4. package/build/md5.min.js +3 -3
  5. package/index.d.ts +148 -0
  6. package/package.json +15 -10
  7. package/src/md5.js +272 -79
  8. package/.covignore +0 -2
  9. package/.npmignore +0 -2
  10. package/.travis.yml +0 -11
  11. package/bower.json +0 -8
  12. package/doc/Md5_.html +0 -1194
  13. package/doc/fonts/OpenSans-Bold-webfont.eot +0 -0
  14. package/doc/fonts/OpenSans-Bold-webfont.svg +0 -1830
  15. package/doc/fonts/OpenSans-Bold-webfont.woff +0 -0
  16. package/doc/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
  17. package/doc/fonts/OpenSans-BoldItalic-webfont.svg +0 -1830
  18. package/doc/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
  19. package/doc/fonts/OpenSans-Italic-webfont.eot +0 -0
  20. package/doc/fonts/OpenSans-Italic-webfont.svg +0 -1830
  21. package/doc/fonts/OpenSans-Italic-webfont.woff +0 -0
  22. package/doc/fonts/OpenSans-Light-webfont.eot +0 -0
  23. package/doc/fonts/OpenSans-Light-webfont.svg +0 -1831
  24. package/doc/fonts/OpenSans-Light-webfont.woff +0 -0
  25. package/doc/fonts/OpenSans-LightItalic-webfont.eot +0 -0
  26. package/doc/fonts/OpenSans-LightItalic-webfont.svg +0 -1835
  27. package/doc/fonts/OpenSans-LightItalic-webfont.woff +0 -0
  28. package/doc/fonts/OpenSans-Regular-webfont.eot +0 -0
  29. package/doc/fonts/OpenSans-Regular-webfont.svg +0 -1831
  30. package/doc/fonts/OpenSans-Regular-webfont.woff +0 -0
  31. package/doc/global.html +0 -309
  32. package/doc/index.html +0 -105
  33. package/doc/md5.html +0 -1469
  34. package/doc/md5.js.html +0 -734
  35. package/doc/scripts/linenumber.js +0 -25
  36. package/doc/scripts/prettify/Apache-License-2.0.txt +0 -202
  37. package/doc/scripts/prettify/lang-css.js +0 -2
  38. package/doc/scripts/prettify/prettify.js +0 -28
  39. package/doc/styles/jsdoc-default.css +0 -358
  40. package/doc/styles/prettify-jsdoc.css +0 -111
  41. package/doc/styles/prettify-tomorrow.css +0 -132
  42. package/tests/index.html +0 -22
  43. package/tests/node-test.js +0 -100
  44. package/tests/requirejs.html +0 -24
  45. package/tests/test.js +0 -270
  46. package/tests/worker-test.js +0 -21
  47. package/tests/worker.html +0 -26
  48. package/tests/worker.js +0 -12
package/doc/global.html DELETED
@@ -1,309 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8">
5
- <title>JSDoc: Global</title>
6
-
7
- <script src="scripts/prettify/prettify.js"> </script>
8
- <script src="scripts/prettify/lang-css.js"> </script>
9
- <!--[if lt IE 9]>
10
- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
11
- <![endif]-->
12
- <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
13
- <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
14
- </head>
15
-
16
- <body>
17
-
18
- <div id="main">
19
-
20
- <h1 class="page-title">Global</h1>
21
-
22
-
23
-
24
-
25
-
26
-
27
- <section>
28
-
29
- <header>
30
-
31
- <h2></h2>
32
-
33
-
34
- </header>
35
-
36
- <article>
37
- <div class="container-overview">
38
-
39
-
40
-
41
-
42
-
43
-
44
- <dl class="details">
45
-
46
-
47
-
48
-
49
-
50
-
51
-
52
-
53
-
54
-
55
-
56
-
57
-
58
-
59
-
60
-
61
-
62
-
63
-
64
-
65
-
66
-
67
-
68
-
69
-
70
-
71
-
72
-
73
-
74
-
75
-
76
-
77
- </dl>
78
-
79
-
80
-
81
-
82
- </div>
83
-
84
-
85
-
86
-
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
-
96
-
97
-
98
-
99
- <h3 class="subsection-title">Methods</h3>
100
-
101
-
102
-
103
-
104
-
105
-
106
-
107
- <h4 class="name" id="md5%08"><span class="type-signature"></span>md5<span class="signature">(message)</span><span class="type-signature"> &rarr; {String}</span></h4>
108
-
109
-
110
-
111
-
112
-
113
-
114
- <div class="description">
115
- Md5 hash function, export to global in browsers.
116
- </div>
117
-
118
-
119
-
120
-
121
-
122
-
123
-
124
-
125
-
126
- <h5>Parameters:</h5>
127
-
128
-
129
- <table class="params">
130
- <thead>
131
- <tr>
132
-
133
- <th>Name</th>
134
-
135
-
136
- <th>Type</th>
137
-
138
-
139
-
140
-
141
-
142
- <th class="last">Description</th>
143
- </tr>
144
- </thead>
145
-
146
- <tbody>
147
-
148
-
149
- <tr>
150
-
151
- <td class="name"><code>message</code></td>
152
-
153
-
154
- <td class="type">
155
-
156
-
157
- <span class="param-type">String</span>
158
- |
159
-
160
- <span class="param-type">Array</span>
161
- |
162
-
163
- <span class="param-type">Uint8Array</span>
164
- |
165
-
166
- <span class="param-type">ArrayBuffer</span>
167
-
168
-
169
-
170
- </td>
171
-
172
-
173
-
174
-
175
-
176
- <td class="description last">message to hash</td>
177
- </tr>
178
-
179
-
180
- </tbody>
181
- </table>
182
-
183
-
184
-
185
-
186
-
187
-
188
- <dl class="details">
189
-
190
-
191
-
192
-
193
-
194
-
195
-
196
-
197
-
198
-
199
-
200
-
201
-
202
-
203
-
204
-
205
-
206
-
207
-
208
-
209
-
210
-
211
-
212
-
213
-
214
-
215
- <dt class="tag-source">Source:</dt>
216
- <dd class="tag-source"><ul class="dummy"><li>
217
- <a href="md5.js.html">md5.js</a>, <a href="md5.js.html#line659">line 659</a>
218
- </li></ul></dd>
219
-
220
-
221
-
222
-
223
-
224
-
225
-
226
- </dl>
227
-
228
-
229
-
230
-
231
-
232
-
233
-
234
-
235
-
236
-
237
-
238
-
239
-
240
- <h5>Returns:</h5>
241
-
242
-
243
- <div class="param-desc">
244
- md5 hashes
245
- </div>
246
-
247
-
248
-
249
- <dl>
250
- <dt>
251
- Type
252
- </dt>
253
- <dd>
254
-
255
- <span class="param-type">String</span>
256
-
257
-
258
- </dd>
259
- </dl>
260
-
261
-
262
-
263
-
264
-
265
-
266
- <h5>Example</h5>
267
-
268
- <pre class="prettyprint"><code>md5(''); // d41d8cd98f00b204e9800998ecf8427e
269
- md5('The quick brown fox jumps over the lazy dog'); // 9e107d9d372bb6826bd81d3542a419d6
270
- md5('The quick brown fox jumps over the lazy dog.'); // e4d909c290d0fb1ca068ffaddf22cbd0
271
-
272
- // It also supports UTF-8 encoding
273
- md5('中文'); // a7bac2239fcdcb3a067903d8077c4a07
274
-
275
- // It also supports byte `Array`, `Uint8Array`, `ArrayBuffer`
276
- md5([]); // d41d8cd98f00b204e9800998ecf8427e
277
- md5(new Uint8Array([])); // d41d8cd98f00b204e9800998ecf8427e</code></pre>
278
-
279
-
280
-
281
-
282
-
283
-
284
-
285
-
286
-
287
- </article>
288
-
289
- </section>
290
-
291
-
292
-
293
-
294
- </div>
295
-
296
- <nav>
297
- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Md5_.html">Md5</a></li></ul><h3>Namespaces</h3><ul><li><a href="md5.html">md5</a></li></ul><h3>Global</h3><ul><li><a href="global.html#md5%2508">md5</a></li></ul>
298
- </nav>
299
-
300
- <br class="clear">
301
-
302
- <footer>
303
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Oct 31 2017 20:29:31 GMT+0800 (CST)
304
- </footer>
305
-
306
- <script> prettyPrint(); </script>
307
- <script src="scripts/linenumber.js"> </script>
308
- </body>
309
- </html>
package/doc/index.html DELETED
@@ -1,105 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8">
5
- <title>JSDoc: Home</title>
6
-
7
- <script src="scripts/prettify/prettify.js"> </script>
8
- <script src="scripts/prettify/lang-css.js"> </script>
9
- <!--[if lt IE 9]>
10
- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
11
- <![endif]-->
12
- <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
13
- <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
14
- </head>
15
-
16
- <body>
17
-
18
- <div id="main">
19
-
20
- <h1 class="page-title">Home</h1>
21
-
22
-
23
-
24
-
25
-
26
-
27
-
28
-
29
- <h3> </h3>
30
-
31
-
32
-
33
-
34
-
35
-
36
-
37
-
38
-
39
-
40
-
41
-
42
-
43
-
44
-
45
- <section>
46
- <article><h1>js-md5</h1><p><a href="https://travis-ci.org/emn178/js-md5"><img src="https://travis-ci.org/emn178/js-md5.svg?branch=master" alt="Build Status"></a>
47
- <a href="https://coveralls.io/r/emn178/js-md5?branch=master"><img src="https://coveralls.io/repos/emn178/js-md5/badge.svg?branch=master" alt="Coverage Status"></a><br><a href="https://nodei.co/npm/js-md5/"><img src="https://nodei.co/npm/js-md5.png?stars&amp;downloads" alt="NPM"></a></p>
48
- <p>A simple MD5 hash function for JavaScript supports UTF-8 encoding.</p>
49
- <h2>Demo</h2><p><a href="http://emn178.github.io/online-tools/md5.html">MD5 Online</a><br><a href="http://emn178.github.io/online-tools/md5_checksum.html">MD5 File Checksum Online</a></p>
50
- <h2>Download</h2><p><a href="https://raw.github.com/emn178/js-md5/master/build/md5.min.js">Compress</a><br><a href="https://raw.github.com/emn178/js-md5/master/src/md5.js">Uncompress</a></p>
51
- <h2>Installation</h2><p>You can also install js-md5 by using Bower.</p>
52
- <pre class="prettyprint source"><code>bower install md5</code></pre><p>For node.js, you can use this command to install:</p>
53
- <pre class="prettyprint source"><code>npm install js-md5</code></pre><h2>Notice</h2><p><code>buffer</code> method is deprecated. This maybe confuse with Buffer in node.js. Please use <code>arrayBuffer</code> instead.</p>
54
- <h2>Usage</h2><p>You could use like this:</p>
55
- <pre class="prettyprint source lang-JavaScript"><code>md5('Message to hash');
56
- var hash = md5.create();
57
- hash.update('Message to hash');
58
- hash.hex();</code></pre><p>If you use node.js, you should require the module first:</p>
59
- <pre class="prettyprint source lang-JavaScript"><code>md5 = require('js-md5');</code></pre><p>It supports AMD:</p>
60
- <pre class="prettyprint source lang-JavaScript"><code>require(['your/path/md5.js'], function(md5) {
61
- // ...
62
- });</code></pre><p><a href="https://emn178.github.com/js-md5/doc/">See document</a></p>
63
- <h2>Example</h2><pre class="prettyprint source lang-JavaScript"><code>md5(''); // d41d8cd98f00b204e9800998ecf8427e
64
- md5('The quick brown fox jumps over the lazy dog'); // 9e107d9d372bb6826bd81d3542a419d6
65
- md5('The quick brown fox jumps over the lazy dog.'); // e4d909c290d0fb1ca068ffaddf22cbd0
66
-
67
- // It also supports UTF-8 encoding
68
- md5('中文'); // a7bac2239fcdcb3a067903d8077c4a07
69
-
70
- // It also supports byte `Array`, `Uint8Array`, `ArrayBuffer`
71
- md5([]); // d41d8cd98f00b204e9800998ecf8427e
72
- md5(new Uint8Array([])); // d41d8cd98f00b204e9800998ecf8427e
73
-
74
- // Different output
75
- md5(''); // d41d8cd98f00b204e9800998ecf8427e
76
- md5.hex(''); // d41d8cd98f00b204e9800998ecf8427e
77
- md5.array(''); // [212, 29, 140, 217, 143, 0, 178, 4, 233, 128, 9, 152, 236, 248, 66, 126]
78
- md5.digest(''); // [212, 29, 140, 217, 143, 0, 178, 4, 233, 128, 9, 152, 236, 248, 66, 126]
79
- md5.arrayBuffer(''); // ArrayBuffer
80
- md5.buffer(''); // ArrayBuffer, deprecated, This maybe confuse with Buffer in node.js. Please use arrayBuffer instead.
81
- md5.base64(''); // 1B2M2Y8AsgTpgAmY7PhCfg==</code></pre><h2>License</h2><p>The project is released under the <a href="http://www.opensource.org/licenses/MIT">MIT license</a>.</p>
82
- <h2>Contact</h2><p>The project's website is located at https://github.com/emn178/js-md5<br>Author: Chen, Yi-Cyuan (emn178@gmail.com)</p></article>
83
- </section>
84
-
85
-
86
-
87
-
88
-
89
-
90
- </div>
91
-
92
- <nav>
93
- <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Md5_.html">Md5</a></li></ul><h3>Namespaces</h3><ul><li><a href="md5.html">md5</a></li></ul><h3>Global</h3><ul><li><a href="global.html#md5%2508">md5</a></li></ul>
94
- </nav>
95
-
96
- <br class="clear">
97
-
98
- <footer>
99
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Oct 31 2017 20:29:31 GMT+0800 (CST)
100
- </footer>
101
-
102
- <script> prettyPrint(); </script>
103
- <script src="scripts/linenumber.js"> </script>
104
- </body>
105
- </html>