js-md5 0.8.2 → 0.9.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.
@@ -0,0 +1,612 @@
1
+ /**
2
+ * [js-md5]{@link https://github.com/emn178/js-md5}
3
+ *
4
+ * @namespace md5
5
+ * @version 0.9.0
6
+ * @author Chen, Yi-Cyuan [emn178@gmail.com]
7
+ * @copyright Chen, Yi-Cyuan 2014-2026
8
+ * @license MIT
9
+ */
10
+ (function () {
11
+
12
+ var INPUT_ERROR = 'input is invalid type';
13
+ var FINALIZE_ERROR = 'finalize already called';
14
+ var WINDOW = typeof window === 'object';
15
+ var root = WINDOW ? window : {};
16
+ if (root.JS_MD5_NO_WINDOW) {
17
+ WINDOW = false;
18
+ }
19
+ var WEB_WORKER = !WINDOW && typeof self === 'object';
20
+ /* istanbul ignore next */
21
+ var NODE_JS = !root.JS_MD5_NO_NODE_JS && !WINDOW && typeof process === 'object' && process.versions && process.versions.node;
22
+ if (NODE_JS) {
23
+ root = global;
24
+ } else if (WEB_WORKER) {
25
+ root = self;
26
+ }
27
+ var COMMON_JS = !root.JS_MD5_NO_COMMON_JS && typeof module === 'object' && module.exports;
28
+ var AMD = typeof define === 'function' && define.amd;
29
+ var HEX_CHARS = '0123456789abcdef'.split('');
30
+ var EXTRA = [128, 32768, 8388608, -2147483648];
31
+ var OUTPUT_TYPES = ['hex', 'array', 'digest', 'arrayBuffer'];
32
+
33
+ var blocks = [], buffer8;
34
+ {
35
+ var buffer = new ArrayBuffer(68);
36
+ buffer8 = new Uint8Array(buffer);
37
+ blocks = new Uint32Array(buffer);
38
+ }
39
+
40
+ var isArray = Array.isArray;
41
+
42
+ var isView = ArrayBuffer.isView;
43
+
44
+ // [message: string, isString: bool]
45
+ var formatMessage = function (message) {
46
+ var type = typeof message;
47
+ if (type === 'string') {
48
+ return [message, true];
49
+ }
50
+ if (type !== 'object' || message === null) {
51
+ throw new Error(INPUT_ERROR);
52
+ }
53
+ if (message.constructor === ArrayBuffer) {
54
+ return [new Uint8Array(message), false];
55
+ }
56
+ if (!isArray(message) && !isView(message)) {
57
+ throw new Error(INPUT_ERROR);
58
+ }
59
+ return [message, false];
60
+ };
61
+
62
+ /**
63
+ * @method hex
64
+ * @memberof md5
65
+ * @description Output hash as hex string
66
+ * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
67
+ * @returns {String} Hex string
68
+ * @example
69
+ * md5.hex('The quick brown fox jumps over the lazy dog');
70
+ * // equal to
71
+ * md5('The quick brown fox jumps over the lazy dog');
72
+ */
73
+ /**
74
+ * @method digest
75
+ * @memberof md5
76
+ * @description Output hash as bytes array
77
+ * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
78
+ * @returns {Array} Bytes array
79
+ * @example
80
+ * md5.digest('The quick brown fox jumps over the lazy dog');
81
+ */
82
+ /**
83
+ * @method array
84
+ * @memberof md5
85
+ * @description Output hash as bytes array
86
+ * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
87
+ * @returns {Array} Bytes array
88
+ * @example
89
+ * md5.array('The quick brown fox jumps over the lazy dog');
90
+ */
91
+ /**
92
+ * @method arrayBuffer
93
+ * @memberof md5
94
+ * @description Output hash as ArrayBuffer
95
+ * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
96
+ * @returns {ArrayBuffer} ArrayBuffer
97
+ * @example
98
+ * md5.arrayBuffer('The quick brown fox jumps over the lazy dog');
99
+ */
100
+ /**
101
+ * @method buffer
102
+ * @deprecated This maybe confuse with Buffer in node.js. Please use arrayBuffer instead.
103
+ * @memberof md5
104
+ * @description Output hash as ArrayBuffer
105
+ * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
106
+ * @returns {ArrayBuffer} ArrayBuffer
107
+ * @example
108
+ * md5.buffer('The quick brown fox jumps over the lazy dog');
109
+ */
110
+ /**
111
+ * @method base64
112
+ * @memberof md5
113
+ * @description Output hash as base64 string
114
+ * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
115
+ * @returns {String} base64 string
116
+ * @example
117
+ * md5.base64('The quick brown fox jumps over the lazy dog');
118
+ */
119
+ var createOutputMethod = function (outputType) {
120
+ return function (message) {
121
+ return new Md5(true).update(message)[outputType]();
122
+ };
123
+ };
124
+
125
+ /**
126
+ * @method create
127
+ * @memberof md5
128
+ * @description Create Md5 object
129
+ * @returns {Md5} Md5 object.
130
+ * @example
131
+ * var hash = md5.create();
132
+ */
133
+ /**
134
+ * @method update
135
+ * @memberof md5
136
+ * @description Create and update Md5 object
137
+ * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
138
+ * @returns {Md5} Md5 object.
139
+ * @example
140
+ * var hash = md5.update('The quick brown fox jumps over the lazy dog');
141
+ * // equal to
142
+ * var hash = md5.create();
143
+ * hash.update('The quick brown fox jumps over the lazy dog');
144
+ */
145
+ var createMethod = function () {
146
+ var method = createOutputMethod('hex');
147
+ if (NODE_JS) {
148
+ method = nodeWrap(method);
149
+ }
150
+ method.create = function () {
151
+ return new Md5();
152
+ };
153
+ method.update = function (message) {
154
+ return method.create().update(message);
155
+ };
156
+ for (var i = 0; i < OUTPUT_TYPES.length; ++i) {
157
+ var type = OUTPUT_TYPES[i];
158
+ method[type] = createOutputMethod(type);
159
+ }
160
+ return method;
161
+ };
162
+
163
+ var nodeWrap = function (method) {
164
+ var crypto = require('crypto');
165
+ var Buffer = require('buffer').Buffer;
166
+ var bufferFrom = Buffer.from;
167
+ var nodeMethod = function (message) {
168
+ if (typeof message === 'string') {
169
+ return crypto.createHash('md5').update(message, 'utf8').digest('hex');
170
+ } else {
171
+ if (message === null || message === undefined) {
172
+ throw new Error(INPUT_ERROR);
173
+ } else if (message.constructor === ArrayBuffer) {
174
+ message = new Uint8Array(message);
175
+ }
176
+ }
177
+ if (isArray(message) || isView(message) ||
178
+ message.constructor === Buffer) {
179
+ return crypto.createHash('md5').update(bufferFrom(message)).digest('hex');
180
+ } else {
181
+ return method(message);
182
+ }
183
+ };
184
+ return nodeMethod;
185
+ };
186
+
187
+ /**
188
+ * Md5 class
189
+ * @class Md5
190
+ * @description This is internal class.
191
+ * @see {@link md5.create}
192
+ */
193
+ function Md5(sharedMemory) {
194
+ if (sharedMemory) {
195
+ blocks[0] = blocks[16] = blocks[1] = blocks[2] = blocks[3] =
196
+ blocks[4] = blocks[5] = blocks[6] = blocks[7] =
197
+ blocks[8] = blocks[9] = blocks[10] = blocks[11] =
198
+ blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;
199
+ this.blocks = blocks;
200
+ this.buffer8 = buffer8;
201
+ } else {
202
+ {
203
+ var buffer = new ArrayBuffer(68);
204
+ this.buffer8 = new Uint8Array(buffer);
205
+ this.blocks = new Uint32Array(buffer);
206
+ }
207
+ }
208
+ this.h0 = this.h1 = this.h2 = this.h3 = this.start = this.bytes = this.hBytes = 0;
209
+ this.finalized = this.hashed = false;
210
+ this.first = true;
211
+ }
212
+
213
+ /**
214
+ * @method update
215
+ * @memberof Md5
216
+ * @instance
217
+ * @description Update hash
218
+ * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
219
+ * @returns {Md5} Md5 object.
220
+ * @see {@link md5.update}
221
+ */
222
+ Md5.prototype.update = function (message) {
223
+ if (this.finalized) {
224
+ throw new Error(FINALIZE_ERROR);
225
+ }
226
+
227
+ var result = formatMessage(message);
228
+ message = result[0];
229
+ var isString = result[1];
230
+ var code, index = 0, i, length = message.length, blocks = this.blocks;
231
+ var buffer8 = this.buffer8;
232
+
233
+ while (index < length) {
234
+ if (this.hashed) {
235
+ this.hashed = false;
236
+ blocks[0] = blocks[16];
237
+ blocks[16] = blocks[1] = blocks[2] = blocks[3] =
238
+ blocks[4] = blocks[5] = blocks[6] = blocks[7] =
239
+ blocks[8] = blocks[9] = blocks[10] = blocks[11] =
240
+ blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;
241
+ }
242
+
243
+ if (isString) {
244
+ {
245
+ for (i = this.start; index < length && i < 64; ++index) {
246
+ code = message.charCodeAt(index);
247
+ if (code < 0x80) {
248
+ buffer8[i++] = code;
249
+ } else if (code < 0x800) {
250
+ buffer8[i++] = 0xc0 | (code >>> 6);
251
+ buffer8[i++] = 0x80 | (code & 0x3f);
252
+ } else if (code < 0xd800 || code >= 0xe000) {
253
+ buffer8[i++] = 0xe0 | (code >>> 12);
254
+ buffer8[i++] = 0x80 | ((code >>> 6) & 0x3f);
255
+ buffer8[i++] = 0x80 | (code & 0x3f);
256
+ } else {
257
+ code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));
258
+ buffer8[i++] = 0xf0 | (code >>> 18);
259
+ buffer8[i++] = 0x80 | ((code >>> 12) & 0x3f);
260
+ buffer8[i++] = 0x80 | ((code >>> 6) & 0x3f);
261
+ buffer8[i++] = 0x80 | (code & 0x3f);
262
+ }
263
+ }
264
+ }
265
+ } else {
266
+ {
267
+ for (i = this.start; index < length && i < 64; ++index) {
268
+ buffer8[i++] = message[index];
269
+ }
270
+ }
271
+ }
272
+ this.lastByteIndex = i;
273
+ this.bytes += i - this.start;
274
+ if (i >= 64) {
275
+ this.start = i - 64;
276
+ this.hash();
277
+ this.hashed = true;
278
+ } else {
279
+ this.start = i;
280
+ }
281
+ }
282
+ if (this.bytes > 4294967295) {
283
+ this.hBytes += this.bytes / 4294967296 << 0;
284
+ this.bytes = this.bytes % 4294967296;
285
+ }
286
+ return this;
287
+ };
288
+
289
+ Md5.prototype.finalize = function () {
290
+ if (this.finalized) {
291
+ return;
292
+ }
293
+ this.finalized = true;
294
+ var blocks = this.blocks, i = this.lastByteIndex;
295
+ blocks[i >>> 2] |= EXTRA[i & 3];
296
+ if (i >= 56) {
297
+ if (!this.hashed) {
298
+ this.hash();
299
+ }
300
+ blocks[0] = blocks[16];
301
+ blocks[16] = blocks[1] = blocks[2] = blocks[3] =
302
+ blocks[4] = blocks[5] = blocks[6] = blocks[7] =
303
+ blocks[8] = blocks[9] = blocks[10] = blocks[11] =
304
+ blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;
305
+ }
306
+ blocks[14] = this.bytes << 3;
307
+ blocks[15] = this.hBytes << 3 | this.bytes >>> 29;
308
+ this.hash();
309
+ };
310
+
311
+ Md5.prototype.hash = function () {
312
+ var a, b, c, d, bc, da, blocks = this.blocks;
313
+
314
+ if (this.first) {
315
+ a = blocks[0] - 680876937;
316
+ a = (a << 7 | a >>> 25) - 271733879 << 0;
317
+ d = (-1732584194 ^ a & 2004318071) + blocks[1] - 117830708;
318
+ d = (d << 12 | d >>> 20) + a << 0;
319
+ c = (-271733879 ^ (d & (a ^ -271733879))) + blocks[2] - 1126478375;
320
+ c = (c << 17 | c >>> 15) + d << 0;
321
+ b = (a ^ (c & (d ^ a))) + blocks[3] - 1316259209;
322
+ b = (b << 22 | b >>> 10) + c << 0;
323
+ } else {
324
+ a = this.h0;
325
+ b = this.h1;
326
+ c = this.h2;
327
+ d = this.h3;
328
+ a += (d ^ (b & (c ^ d))) + blocks[0] - 680876936;
329
+ a = (a << 7 | a >>> 25) + b << 0;
330
+ d += (c ^ (a & (b ^ c))) + blocks[1] - 389564586;
331
+ d = (d << 12 | d >>> 20) + a << 0;
332
+ c += (b ^ (d & (a ^ b))) + blocks[2] + 606105819;
333
+ c = (c << 17 | c >>> 15) + d << 0;
334
+ b += (a ^ (c & (d ^ a))) + blocks[3] - 1044525330;
335
+ b = (b << 22 | b >>> 10) + c << 0;
336
+ }
337
+
338
+ a += (d ^ (b & (c ^ d))) + blocks[4] - 176418897;
339
+ a = (a << 7 | a >>> 25) + b << 0;
340
+ d += (c ^ (a & (b ^ c))) + blocks[5] + 1200080426;
341
+ d = (d << 12 | d >>> 20) + a << 0;
342
+ c += (b ^ (d & (a ^ b))) + blocks[6] - 1473231341;
343
+ c = (c << 17 | c >>> 15) + d << 0;
344
+ b += (a ^ (c & (d ^ a))) + blocks[7] - 45705983;
345
+ b = (b << 22 | b >>> 10) + c << 0;
346
+ a += (d ^ (b & (c ^ d))) + blocks[8] + 1770035416;
347
+ a = (a << 7 | a >>> 25) + b << 0;
348
+ d += (c ^ (a & (b ^ c))) + blocks[9] - 1958414417;
349
+ d = (d << 12 | d >>> 20) + a << 0;
350
+ c += (b ^ (d & (a ^ b))) + blocks[10] - 42063;
351
+ c = (c << 17 | c >>> 15) + d << 0;
352
+ b += (a ^ (c & (d ^ a))) + blocks[11] - 1990404162;
353
+ b = (b << 22 | b >>> 10) + c << 0;
354
+ a += (d ^ (b & (c ^ d))) + blocks[12] + 1804603682;
355
+ a = (a << 7 | a >>> 25) + b << 0;
356
+ d += (c ^ (a & (b ^ c))) + blocks[13] - 40341101;
357
+ d = (d << 12 | d >>> 20) + a << 0;
358
+ c += (b ^ (d & (a ^ b))) + blocks[14] - 1502002290;
359
+ c = (c << 17 | c >>> 15) + d << 0;
360
+ b += (a ^ (c & (d ^ a))) + blocks[15] + 1236535329;
361
+ b = (b << 22 | b >>> 10) + c << 0;
362
+ a += (c ^ (d & (b ^ c))) + blocks[1] - 165796510;
363
+ a = (a << 5 | a >>> 27) + b << 0;
364
+ d += (b ^ (c & (a ^ b))) + blocks[6] - 1069501632;
365
+ d = (d << 9 | d >>> 23) + a << 0;
366
+ c += (a ^ (b & (d ^ a))) + blocks[11] + 643717713;
367
+ c = (c << 14 | c >>> 18) + d << 0;
368
+ b += (d ^ (a & (c ^ d))) + blocks[0] - 373897302;
369
+ b = (b << 20 | b >>> 12) + c << 0;
370
+ a += (c ^ (d & (b ^ c))) + blocks[5] - 701558691;
371
+ a = (a << 5 | a >>> 27) + b << 0;
372
+ d += (b ^ (c & (a ^ b))) + blocks[10] + 38016083;
373
+ d = (d << 9 | d >>> 23) + a << 0;
374
+ c += (a ^ (b & (d ^ a))) + blocks[15] - 660478335;
375
+ c = (c << 14 | c >>> 18) + d << 0;
376
+ b += (d ^ (a & (c ^ d))) + blocks[4] - 405537848;
377
+ b = (b << 20 | b >>> 12) + c << 0;
378
+ a += (c ^ (d & (b ^ c))) + blocks[9] + 568446438;
379
+ a = (a << 5 | a >>> 27) + b << 0;
380
+ d += (b ^ (c & (a ^ b))) + blocks[14] - 1019803690;
381
+ d = (d << 9 | d >>> 23) + a << 0;
382
+ c += (a ^ (b & (d ^ a))) + blocks[3] - 187363961;
383
+ c = (c << 14 | c >>> 18) + d << 0;
384
+ b += (d ^ (a & (c ^ d))) + blocks[8] + 1163531501;
385
+ b = (b << 20 | b >>> 12) + c << 0;
386
+ a += (c ^ (d & (b ^ c))) + blocks[13] - 1444681467;
387
+ a = (a << 5 | a >>> 27) + b << 0;
388
+ d += (b ^ (c & (a ^ b))) + blocks[2] - 51403784;
389
+ d = (d << 9 | d >>> 23) + a << 0;
390
+ c += (a ^ (b & (d ^ a))) + blocks[7] + 1735328473;
391
+ c = (c << 14 | c >>> 18) + d << 0;
392
+ b += (d ^ (a & (c ^ d))) + blocks[12] - 1926607734;
393
+ b = (b << 20 | b >>> 12) + c << 0;
394
+ bc = b ^ c;
395
+ a += (bc ^ d) + blocks[5] - 378558;
396
+ a = (a << 4 | a >>> 28) + b << 0;
397
+ d += (bc ^ a) + blocks[8] - 2022574463;
398
+ d = (d << 11 | d >>> 21) + a << 0;
399
+ da = d ^ a;
400
+ c += (da ^ b) + blocks[11] + 1839030562;
401
+ c = (c << 16 | c >>> 16) + d << 0;
402
+ b += (da ^ c) + blocks[14] - 35309556;
403
+ b = (b << 23 | b >>> 9) + c << 0;
404
+ bc = b ^ c;
405
+ a += (bc ^ d) + blocks[1] - 1530992060;
406
+ a = (a << 4 | a >>> 28) + b << 0;
407
+ d += (bc ^ a) + blocks[4] + 1272893353;
408
+ d = (d << 11 | d >>> 21) + a << 0;
409
+ da = d ^ a;
410
+ c += (da ^ b) + blocks[7] - 155497632;
411
+ c = (c << 16 | c >>> 16) + d << 0;
412
+ b += (da ^ c) + blocks[10] - 1094730640;
413
+ b = (b << 23 | b >>> 9) + c << 0;
414
+ bc = b ^ c;
415
+ a += (bc ^ d) + blocks[13] + 681279174;
416
+ a = (a << 4 | a >>> 28) + b << 0;
417
+ d += (bc ^ a) + blocks[0] - 358537222;
418
+ d = (d << 11 | d >>> 21) + a << 0;
419
+ da = d ^ a;
420
+ c += (da ^ b) + blocks[3] - 722521979;
421
+ c = (c << 16 | c >>> 16) + d << 0;
422
+ b += (da ^ c) + blocks[6] + 76029189;
423
+ b = (b << 23 | b >>> 9) + c << 0;
424
+ bc = b ^ c;
425
+ a += (bc ^ d) + blocks[9] - 640364487;
426
+ a = (a << 4 | a >>> 28) + b << 0;
427
+ d += (bc ^ a) + blocks[12] - 421815835;
428
+ d = (d << 11 | d >>> 21) + a << 0;
429
+ da = d ^ a;
430
+ c += (da ^ b) + blocks[15] + 530742520;
431
+ c = (c << 16 | c >>> 16) + d << 0;
432
+ b += (da ^ c) + blocks[2] - 995338651;
433
+ b = (b << 23 | b >>> 9) + c << 0;
434
+ a += (c ^ (b | ~d)) + blocks[0] - 198630844;
435
+ a = (a << 6 | a >>> 26) + b << 0;
436
+ d += (b ^ (a | ~c)) + blocks[7] + 1126891415;
437
+ d = (d << 10 | d >>> 22) + a << 0;
438
+ c += (a ^ (d | ~b)) + blocks[14] - 1416354905;
439
+ c = (c << 15 | c >>> 17) + d << 0;
440
+ b += (d ^ (c | ~a)) + blocks[5] - 57434055;
441
+ b = (b << 21 | b >>> 11) + c << 0;
442
+ a += (c ^ (b | ~d)) + blocks[12] + 1700485571;
443
+ a = (a << 6 | a >>> 26) + b << 0;
444
+ d += (b ^ (a | ~c)) + blocks[3] - 1894986606;
445
+ d = (d << 10 | d >>> 22) + a << 0;
446
+ c += (a ^ (d | ~b)) + blocks[10] - 1051523;
447
+ c = (c << 15 | c >>> 17) + d << 0;
448
+ b += (d ^ (c | ~a)) + blocks[1] - 2054922799;
449
+ b = (b << 21 | b >>> 11) + c << 0;
450
+ a += (c ^ (b | ~d)) + blocks[8] + 1873313359;
451
+ a = (a << 6 | a >>> 26) + b << 0;
452
+ d += (b ^ (a | ~c)) + blocks[15] - 30611744;
453
+ d = (d << 10 | d >>> 22) + a << 0;
454
+ c += (a ^ (d | ~b)) + blocks[6] - 1560198380;
455
+ c = (c << 15 | c >>> 17) + d << 0;
456
+ b += (d ^ (c | ~a)) + blocks[13] + 1309151649;
457
+ b = (b << 21 | b >>> 11) + c << 0;
458
+ a += (c ^ (b | ~d)) + blocks[4] - 145523070;
459
+ a = (a << 6 | a >>> 26) + b << 0;
460
+ d += (b ^ (a | ~c)) + blocks[11] - 1120210379;
461
+ d = (d << 10 | d >>> 22) + a << 0;
462
+ c += (a ^ (d | ~b)) + blocks[2] + 718787259;
463
+ c = (c << 15 | c >>> 17) + d << 0;
464
+ b += (d ^ (c | ~a)) + blocks[9] - 343485551;
465
+ b = (b << 21 | b >>> 11) + c << 0;
466
+
467
+ if (this.first) {
468
+ this.h0 = a + 1732584193 << 0;
469
+ this.h1 = b - 271733879 << 0;
470
+ this.h2 = c - 1732584194 << 0;
471
+ this.h3 = d + 271733878 << 0;
472
+ this.first = false;
473
+ } else {
474
+ this.h0 = this.h0 + a << 0;
475
+ this.h1 = this.h1 + b << 0;
476
+ this.h2 = this.h2 + c << 0;
477
+ this.h3 = this.h3 + d << 0;
478
+ }
479
+ };
480
+
481
+ /**
482
+ * @method hex
483
+ * @memberof Md5
484
+ * @instance
485
+ * @description Output hash as hex string
486
+ * @returns {String} Hex string
487
+ * @see {@link md5.hex}
488
+ * @example
489
+ * hash.hex();
490
+ */
491
+ Md5.prototype.hex = function () {
492
+ this.finalize();
493
+
494
+ var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3;
495
+
496
+ return HEX_CHARS[(h0 >>> 4) & 0x0F] + HEX_CHARS[h0 & 0x0F] +
497
+ HEX_CHARS[(h0 >>> 12) & 0x0F] + HEX_CHARS[(h0 >>> 8) & 0x0F] +
498
+ HEX_CHARS[(h0 >>> 20) & 0x0F] + HEX_CHARS[(h0 >>> 16) & 0x0F] +
499
+ HEX_CHARS[(h0 >>> 28) & 0x0F] + HEX_CHARS[(h0 >>> 24) & 0x0F] +
500
+ HEX_CHARS[(h1 >>> 4) & 0x0F] + HEX_CHARS[h1 & 0x0F] +
501
+ HEX_CHARS[(h1 >>> 12) & 0x0F] + HEX_CHARS[(h1 >>> 8) & 0x0F] +
502
+ HEX_CHARS[(h1 >>> 20) & 0x0F] + HEX_CHARS[(h1 >>> 16) & 0x0F] +
503
+ HEX_CHARS[(h1 >>> 28) & 0x0F] + HEX_CHARS[(h1 >>> 24) & 0x0F] +
504
+ HEX_CHARS[(h2 >>> 4) & 0x0F] + HEX_CHARS[h2 & 0x0F] +
505
+ HEX_CHARS[(h2 >>> 12) & 0x0F] + HEX_CHARS[(h2 >>> 8) & 0x0F] +
506
+ HEX_CHARS[(h2 >>> 20) & 0x0F] + HEX_CHARS[(h2 >>> 16) & 0x0F] +
507
+ HEX_CHARS[(h2 >>> 28) & 0x0F] + HEX_CHARS[(h2 >>> 24) & 0x0F] +
508
+ HEX_CHARS[(h3 >>> 4) & 0x0F] + HEX_CHARS[h3 & 0x0F] +
509
+ HEX_CHARS[(h3 >>> 12) & 0x0F] + HEX_CHARS[(h3 >>> 8) & 0x0F] +
510
+ HEX_CHARS[(h3 >>> 20) & 0x0F] + HEX_CHARS[(h3 >>> 16) & 0x0F] +
511
+ HEX_CHARS[(h3 >>> 28) & 0x0F] + HEX_CHARS[(h3 >>> 24) & 0x0F];
512
+ };
513
+
514
+ /**
515
+ * @method toString
516
+ * @memberof Md5
517
+ * @instance
518
+ * @description Output hash as hex string
519
+ * @returns {String} Hex string
520
+ * @see {@link md5.hex}
521
+ * @example
522
+ * hash.toString();
523
+ */
524
+ Md5.prototype.toString = Md5.prototype.hex;
525
+
526
+ /**
527
+ * @method digest
528
+ * @memberof Md5
529
+ * @instance
530
+ * @description Output hash as bytes array
531
+ * @returns {Array} Bytes array
532
+ * @see {@link md5.digest}
533
+ * @example
534
+ * hash.digest();
535
+ */
536
+ Md5.prototype.digest = function () {
537
+ this.finalize();
538
+
539
+ var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3;
540
+ return [
541
+ h0 & 0xFF, (h0 >>> 8) & 0xFF, (h0 >>> 16) & 0xFF, (h0 >>> 24) & 0xFF,
542
+ h1 & 0xFF, (h1 >>> 8) & 0xFF, (h1 >>> 16) & 0xFF, (h1 >>> 24) & 0xFF,
543
+ h2 & 0xFF, (h2 >>> 8) & 0xFF, (h2 >>> 16) & 0xFF, (h2 >>> 24) & 0xFF,
544
+ h3 & 0xFF, (h3 >>> 8) & 0xFF, (h3 >>> 16) & 0xFF, (h3 >>> 24) & 0xFF
545
+ ];
546
+ };
547
+
548
+ /**
549
+ * @method array
550
+ * @memberof Md5
551
+ * @instance
552
+ * @description Output hash as bytes array
553
+ * @returns {Array} Bytes array
554
+ * @see {@link md5.array}
555
+ * @example
556
+ * hash.array();
557
+ */
558
+ Md5.prototype.array = Md5.prototype.digest;
559
+
560
+ /**
561
+ * @method arrayBuffer
562
+ * @memberof Md5
563
+ * @instance
564
+ * @description Output hash as ArrayBuffer
565
+ * @returns {ArrayBuffer} ArrayBuffer
566
+ * @see {@link md5.arrayBuffer}
567
+ * @example
568
+ * hash.arrayBuffer();
569
+ */
570
+ Md5.prototype.arrayBuffer = function () {
571
+ this.finalize();
572
+
573
+ var buffer = new ArrayBuffer(16);
574
+ var blocks = new Uint32Array(buffer);
575
+ blocks[0] = this.h0;
576
+ blocks[1] = this.h1;
577
+ blocks[2] = this.h2;
578
+ blocks[3] = this.h3;
579
+ return buffer;
580
+ };
581
+
582
+ var exports = createMethod();
583
+ exports.md5 = exports;
584
+
585
+ if (COMMON_JS) {
586
+ module.exports = exports;
587
+ } else {
588
+ /**
589
+ * @method md5
590
+ * @description Md5 hash function, export to global in browsers.
591
+ * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
592
+ * @returns {String} md5 hashes
593
+ * @example
594
+ * md5(''); // d41d8cd98f00b204e9800998ecf8427e
595
+ * md5('The quick brown fox jumps over the lazy dog'); // 9e107d9d372bb6826bd81d3542a419d6
596
+ * md5('The quick brown fox jumps over the lazy dog.'); // e4d909c290d0fb1ca068ffaddf22cbd0
597
+ *
598
+ * // It also supports UTF-8 encoding
599
+ * md5('中文'); // a7bac2239fcdcb3a067903d8077c4a07
600
+ *
601
+ * // It also supports byte `Array`, `Uint8Array`, `ArrayBuffer`
602
+ * md5([]); // d41d8cd98f00b204e9800998ecf8427e
603
+ * md5(new Uint8Array([])); // d41d8cd98f00b204e9800998ecf8427e
604
+ */
605
+ root.md5 = exports;
606
+ if (AMD) {
607
+ define(function () {
608
+ return exports;
609
+ });
610
+ }
611
+ }
612
+ })();
@@ -0,0 +1,10 @@
1
+ /**
2
+ * [js-md5]{@link https://github.com/emn178/js-md5}
3
+ *
4
+ * @namespace md5
5
+ * @version 0.9.0
6
+ * @author Chen, Yi-Cyuan [emn178@gmail.com]
7
+ * @copyright Chen, Yi-Cyuan 2014-2026
8
+ * @license MIT
9
+ */
10
+ !function(){var t="input is invalid type",r="object"==typeof window,i=r?window:{};i.JS_MD5_NO_WINDOW&&(r=!1);var e=!r&&"object"==typeof self,h=!i.JS_MD5_NO_NODE_JS&&!r&&"object"==typeof process&&process.versions&&process.versions.node;h?i=global:e&&(i=self);var s,n=!i.JS_MD5_NO_COMMON_JS&&"object"==typeof module&&module.exports,o="function"==typeof define&&define.amd,a="0123456789abcdef".split(""),f=[128,32768,8388608,-2147483648],u=["hex","array","digest","arrayBuffer"],y=[],c=new ArrayBuffer(68);s=new Uint8Array(c),y=new Uint32Array(c);var d=Array.isArray,p=ArrayBuffer.isView,l=function(t){return function(r){return new b(!0).update(r)[t]()}},w=function(r){var i=require("crypto"),e=require("buffer").Buffer,h=e.from;return function(s){if("string"==typeof s)return i.createHash("md5").update(s,"utf8").digest("hex");if(null==s)throw new Error(t);return s.constructor===ArrayBuffer&&(s=new Uint8Array(s)),d(s)||p(s)||s.constructor===e?i.createHash("md5").update(h(s)).digest("hex"):r(s)}};function b(t){if(t)y[0]=y[16]=y[1]=y[2]=y[3]=y[4]=y[5]=y[6]=y[7]=y[8]=y[9]=y[10]=y[11]=y[12]=y[13]=y[14]=y[15]=0,this.blocks=y,this.buffer8=s;else{var r=new ArrayBuffer(68);this.buffer8=new Uint8Array(r),this.blocks=new Uint32Array(r)}this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}b.prototype.update=function(r){if(this.finalized)throw new Error("finalize already called");var i=function(r){var i=typeof r;if("string"===i)return[r,!0];if("object"!==i||null===r)throw new Error(t);if(r.constructor===ArrayBuffer)return[new Uint8Array(r),!1];if(!d(r)&&!p(r))throw new Error(t);return[r,!1]}(r);r=i[0];for(var e,h,s=i[1],n=0,o=r.length,a=this.blocks,f=this.buffer8;n<o;){if(this.hashed&&(this.hashed=!1,a[0]=a[16],a[16]=a[1]=a[2]=a[3]=a[4]=a[5]=a[6]=a[7]=a[8]=a[9]=a[10]=a[11]=a[12]=a[13]=a[14]=a[15]=0),s)for(h=this.start;n<o&&h<64;++n)(e=r.charCodeAt(n))<128?f[h++]=e:e<2048?(f[h++]=192|e>>>6,f[h++]=128|63&e):e<55296||e>=57344?(f[h++]=224|e>>>12,f[h++]=128|e>>>6&63,f[h++]=128|63&e):(e=65536+((1023&e)<<10|1023&r.charCodeAt(++n)),f[h++]=240|e>>>18,f[h++]=128|e>>>12&63,f[h++]=128|e>>>6&63,f[h++]=128|63&e);else for(h=this.start;n<o&&h<64;++n)f[h++]=r[n];this.lastByteIndex=h,this.bytes+=h-this.start,h>=64?(this.start=h-64,this.hash(),this.hashed=!0):this.start=h}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296|0,this.bytes=this.bytes%4294967296),this},b.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,r=this.lastByteIndex;t[r>>>2]|=f[3&r],r>=56&&(this.hashed||this.hash(),t[0]=t[16],t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.bytes<<3,t[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},b.prototype.hash=function(){var t,r,i,e,h,s,n=this.blocks;this.first?r=((r=((t=((t=n[0]-680876937)<<7|t>>>25)-271733879|0)^(i=((i=(-271733879^(e=((e=(-1732584194^2004318071&t)+n[1]-117830708)<<12|e>>>20)+t|0)&(-271733879^t))+n[2]-1126478375)<<17|i>>>15)+e|0)&(e^t))+n[3]-1316259209)<<22|r>>>10)+i|0:(t=this.h0,r=this.h1,i=this.h2,r=((r+=((t=((t+=((e=this.h3)^r&(i^e))+n[0]-680876936)<<7|t>>>25)+r|0)^(i=((i+=(r^(e=((e+=(i^t&(r^i))+n[1]-389564586)<<12|e>>>20)+t|0)&(t^r))+n[2]+606105819)<<17|i>>>15)+e|0)&(e^t))+n[3]-1044525330)<<22|r>>>10)+i|0),r=((r+=((t=((t+=(e^r&(i^e))+n[4]-176418897)<<7|t>>>25)+r|0)^(i=((i+=(r^(e=((e+=(i^t&(r^i))+n[5]+1200080426)<<12|e>>>20)+t|0)&(t^r))+n[6]-1473231341)<<17|i>>>15)+e|0)&(e^t))+n[7]-45705983)<<22|r>>>10)+i|0,r=((r+=((t=((t+=(e^r&(i^e))+n[8]+1770035416)<<7|t>>>25)+r|0)^(i=((i+=(r^(e=((e+=(i^t&(r^i))+n[9]-1958414417)<<12|e>>>20)+t|0)&(t^r))+n[10]-42063)<<17|i>>>15)+e|0)&(e^t))+n[11]-1990404162)<<22|r>>>10)+i|0,r=((r+=((t=((t+=(e^r&(i^e))+n[12]+1804603682)<<7|t>>>25)+r|0)^(i=((i+=(r^(e=((e+=(i^t&(r^i))+n[13]-40341101)<<12|e>>>20)+t|0)&(t^r))+n[14]-1502002290)<<17|i>>>15)+e|0)&(e^t))+n[15]+1236535329)<<22|r>>>10)+i|0,r=((r+=((e=((e+=(r^i&((t=((t+=(i^e&(r^i))+n[1]-165796510)<<5|t>>>27)+r|0)^r))+n[6]-1069501632)<<9|e>>>23)+t|0)^t&((i=((i+=(t^r&(e^t))+n[11]+643717713)<<14|i>>>18)+e|0)^e))+n[0]-373897302)<<20|r>>>12)+i|0,r=((r+=((e=((e+=(r^i&((t=((t+=(i^e&(r^i))+n[5]-701558691)<<5|t>>>27)+r|0)^r))+n[10]+38016083)<<9|e>>>23)+t|0)^t&((i=((i+=(t^r&(e^t))+n[15]-660478335)<<14|i>>>18)+e|0)^e))+n[4]-405537848)<<20|r>>>12)+i|0,r=((r+=((e=((e+=(r^i&((t=((t+=(i^e&(r^i))+n[9]+568446438)<<5|t>>>27)+r|0)^r))+n[14]-1019803690)<<9|e>>>23)+t|0)^t&((i=((i+=(t^r&(e^t))+n[3]-187363961)<<14|i>>>18)+e|0)^e))+n[8]+1163531501)<<20|r>>>12)+i|0,r=((r+=((e=((e+=(r^i&((t=((t+=(i^e&(r^i))+n[13]-1444681467)<<5|t>>>27)+r|0)^r))+n[2]-51403784)<<9|e>>>23)+t|0)^t&((i=((i+=(t^r&(e^t))+n[7]+1735328473)<<14|i>>>18)+e|0)^e))+n[12]-1926607734)<<20|r>>>12)+i|0,r=((r+=((s=(e=((e+=((h=r^i)^(t=((t+=(h^e)+n[5]-378558)<<4|t>>>28)+r|0))+n[8]-2022574463)<<11|e>>>21)+t|0)^t)^(i=((i+=(s^r)+n[11]+1839030562)<<16|i>>>16)+e|0))+n[14]-35309556)<<23|r>>>9)+i|0,r=((r+=((s=(e=((e+=((h=r^i)^(t=((t+=(h^e)+n[1]-1530992060)<<4|t>>>28)+r|0))+n[4]+1272893353)<<11|e>>>21)+t|0)^t)^(i=((i+=(s^r)+n[7]-155497632)<<16|i>>>16)+e|0))+n[10]-1094730640)<<23|r>>>9)+i|0,r=((r+=((s=(e=((e+=((h=r^i)^(t=((t+=(h^e)+n[13]+681279174)<<4|t>>>28)+r|0))+n[0]-358537222)<<11|e>>>21)+t|0)^t)^(i=((i+=(s^r)+n[3]-722521979)<<16|i>>>16)+e|0))+n[6]+76029189)<<23|r>>>9)+i|0,r=((r+=((s=(e=((e+=((h=r^i)^(t=((t+=(h^e)+n[9]-640364487)<<4|t>>>28)+r|0))+n[12]-421815835)<<11|e>>>21)+t|0)^t)^(i=((i+=(s^r)+n[15]+530742520)<<16|i>>>16)+e|0))+n[2]-995338651)<<23|r>>>9)+i|0,r=((r+=((e=((e+=(r^((t=((t+=(i^(r|~e))+n[0]-198630844)<<6|t>>>26)+r|0)|~i))+n[7]+1126891415)<<10|e>>>22)+t|0)^((i=((i+=(t^(e|~r))+n[14]-1416354905)<<15|i>>>17)+e|0)|~t))+n[5]-57434055)<<21|r>>>11)+i|0,r=((r+=((e=((e+=(r^((t=((t+=(i^(r|~e))+n[12]+1700485571)<<6|t>>>26)+r|0)|~i))+n[3]-1894986606)<<10|e>>>22)+t|0)^((i=((i+=(t^(e|~r))+n[10]-1051523)<<15|i>>>17)+e|0)|~t))+n[1]-2054922799)<<21|r>>>11)+i|0,r=((r+=((e=((e+=(r^((t=((t+=(i^(r|~e))+n[8]+1873313359)<<6|t>>>26)+r|0)|~i))+n[15]-30611744)<<10|e>>>22)+t|0)^((i=((i+=(t^(e|~r))+n[6]-1560198380)<<15|i>>>17)+e|0)|~t))+n[13]+1309151649)<<21|r>>>11)+i|0,r=((r+=((e=((e+=(r^((t=((t+=(i^(r|~e))+n[4]-145523070)<<6|t>>>26)+r|0)|~i))+n[11]-1120210379)<<10|e>>>22)+t|0)^((i=((i+=(t^(e|~r))+n[2]+718787259)<<15|i>>>17)+e|0)|~t))+n[9]-343485551)<<21|r>>>11)+i|0,this.first?(this.h0=t+1732584193|0,this.h1=r-271733879|0,this.h2=i-1732584194|0,this.h3=e+271733878|0,this.first=!1):(this.h0=this.h0+t|0,this.h1=this.h1+r|0,this.h2=this.h2+i|0,this.h3=this.h3+e|0)},b.prototype.hex=function(){this.finalize();var t=this.h0,r=this.h1,i=this.h2,e=this.h3;return a[t>>>4&15]+a[15&t]+a[t>>>12&15]+a[t>>>8&15]+a[t>>>20&15]+a[t>>>16&15]+a[t>>>28&15]+a[t>>>24&15]+a[r>>>4&15]+a[15&r]+a[r>>>12&15]+a[r>>>8&15]+a[r>>>20&15]+a[r>>>16&15]+a[r>>>28&15]+a[r>>>24&15]+a[i>>>4&15]+a[15&i]+a[i>>>12&15]+a[i>>>8&15]+a[i>>>20&15]+a[i>>>16&15]+a[i>>>28&15]+a[i>>>24&15]+a[e>>>4&15]+a[15&e]+a[e>>>12&15]+a[e>>>8&15]+a[e>>>20&15]+a[e>>>16&15]+a[e>>>28&15]+a[e>>>24&15]},b.prototype.toString=b.prototype.hex,b.prototype.digest=function(){this.finalize();var t=this.h0,r=this.h1,i=this.h2,e=this.h3;return[255&t,t>>>8&255,t>>>16&255,t>>>24&255,255&r,r>>>8&255,r>>>16&255,r>>>24&255,255&i,i>>>8&255,i>>>16&255,i>>>24&255,255&e,e>>>8&255,e>>>16&255,e>>>24&255]},b.prototype.array=b.prototype.digest,b.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(16),r=new Uint32Array(t);return r[0]=this.h0,r[1]=this.h1,r[2]=this.h2,r[3]=this.h3,t};var v=function(){var t=l("hex");h&&(t=w(t)),t.create=function(){return new b},t.update=function(r){return t.create().update(r)};for(var r=0;r<u.length;++r){var i=u[r];t[i]=l(i)}return t}();v.md5=v,n?module.exports=v:(i.md5=v,o&&define(function(){return v}))}();
@@ -0,0 +1,10 @@
1
+ function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var i,h={exports:{}};
2
+ /**
3
+ * [js-md5]{@link https://github.com/emn178/js-md5}
4
+ *
5
+ * @namespace md5
6
+ * @version 0.9.0
7
+ * @author Chen, Yi-Cyuan [emn178@gmail.com]
8
+ * @copyright Chen, Yi-Cyuan 2014-2026
9
+ * @license MIT
10
+ */i=h,function(){var t="input is invalid type",h="object"==typeof window,r=h?window:{};r.JS_MD5_NO_WINDOW&&(h=!1),!h&&"object"==typeof self&&(r=self);var s,e=!r.JS_MD5_NO_COMMON_JS&&i.exports,n="0123456789abcdef".split(""),a=[128,32768,8388608,-2147483648],o=["hex","array","digest","arrayBuffer"],f=[],u=new ArrayBuffer(68);s=new Uint8Array(u),f=new Uint32Array(u);var y=Array.isArray,p=ArrayBuffer.isView,l=function(t){return function(i){return new c(!0).update(i)[t]()}};function c(t){if(t)f[0]=f[16]=f[1]=f[2]=f[3]=f[4]=f[5]=f[6]=f[7]=f[8]=f[9]=f[10]=f[11]=f[12]=f[13]=f[14]=f[15]=0,this.blocks=f,this.buffer8=s;else{var i=new ArrayBuffer(68);this.buffer8=new Uint8Array(i),this.blocks=new Uint32Array(i)}this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}c.prototype.update=function(i){if(this.finalized)throw new Error("finalize already called");var h=function(i){var h=typeof i;if("string"===h)return[i,!0];if("object"!==h||null===i)throw new Error(t);if(i.constructor===ArrayBuffer)return[new Uint8Array(i),!1];if(!y(i)&&!p(i))throw new Error(t);return[i,!1]}(i);i=h[0];for(var r,s,e=h[1],n=0,a=i.length,o=this.blocks,f=this.buffer8;n<a;){if(this.hashed&&(this.hashed=!1,o[0]=o[16],o[16]=o[1]=o[2]=o[3]=o[4]=o[5]=o[6]=o[7]=o[8]=o[9]=o[10]=o[11]=o[12]=o[13]=o[14]=o[15]=0),e)for(s=this.start;n<a&&s<64;++n)(r=i.charCodeAt(n))<128?f[s++]=r:r<2048?(f[s++]=192|r>>>6,f[s++]=128|63&r):r<55296||r>=57344?(f[s++]=224|r>>>12,f[s++]=128|r>>>6&63,f[s++]=128|63&r):(r=65536+((1023&r)<<10|1023&i.charCodeAt(++n)),f[s++]=240|r>>>18,f[s++]=128|r>>>12&63,f[s++]=128|r>>>6&63,f[s++]=128|63&r);else for(s=this.start;n<a&&s<64;++n)f[s++]=i[n];this.lastByteIndex=s,this.bytes+=s-this.start,s>=64?(this.start=s-64,this.hash(),this.hashed=!0):this.start=s}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296|0,this.bytes=this.bytes%4294967296),this},c.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,i=this.lastByteIndex;t[i>>>2]|=a[3&i],i>=56&&(this.hashed||this.hash(),t[0]=t[16],t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.bytes<<3,t[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},c.prototype.hash=function(){var t,i,h,r,s,e,n=this.blocks;this.first?i=((i=((t=((t=n[0]-680876937)<<7|t>>>25)-271733879|0)^(h=((h=(-271733879^(r=((r=(-1732584194^2004318071&t)+n[1]-117830708)<<12|r>>>20)+t|0)&(-271733879^t))+n[2]-1126478375)<<17|h>>>15)+r|0)&(r^t))+n[3]-1316259209)<<22|i>>>10)+h|0:(t=this.h0,i=this.h1,h=this.h2,i=((i+=((t=((t+=((r=this.h3)^i&(h^r))+n[0]-680876936)<<7|t>>>25)+i|0)^(h=((h+=(i^(r=((r+=(h^t&(i^h))+n[1]-389564586)<<12|r>>>20)+t|0)&(t^i))+n[2]+606105819)<<17|h>>>15)+r|0)&(r^t))+n[3]-1044525330)<<22|i>>>10)+h|0),i=((i+=((t=((t+=(r^i&(h^r))+n[4]-176418897)<<7|t>>>25)+i|0)^(h=((h+=(i^(r=((r+=(h^t&(i^h))+n[5]+1200080426)<<12|r>>>20)+t|0)&(t^i))+n[6]-1473231341)<<17|h>>>15)+r|0)&(r^t))+n[7]-45705983)<<22|i>>>10)+h|0,i=((i+=((t=((t+=(r^i&(h^r))+n[8]+1770035416)<<7|t>>>25)+i|0)^(h=((h+=(i^(r=((r+=(h^t&(i^h))+n[9]-1958414417)<<12|r>>>20)+t|0)&(t^i))+n[10]-42063)<<17|h>>>15)+r|0)&(r^t))+n[11]-1990404162)<<22|i>>>10)+h|0,i=((i+=((t=((t+=(r^i&(h^r))+n[12]+1804603682)<<7|t>>>25)+i|0)^(h=((h+=(i^(r=((r+=(h^t&(i^h))+n[13]-40341101)<<12|r>>>20)+t|0)&(t^i))+n[14]-1502002290)<<17|h>>>15)+r|0)&(r^t))+n[15]+1236535329)<<22|i>>>10)+h|0,i=((i+=((r=((r+=(i^h&((t=((t+=(h^r&(i^h))+n[1]-165796510)<<5|t>>>27)+i|0)^i))+n[6]-1069501632)<<9|r>>>23)+t|0)^t&((h=((h+=(t^i&(r^t))+n[11]+643717713)<<14|h>>>18)+r|0)^r))+n[0]-373897302)<<20|i>>>12)+h|0,i=((i+=((r=((r+=(i^h&((t=((t+=(h^r&(i^h))+n[5]-701558691)<<5|t>>>27)+i|0)^i))+n[10]+38016083)<<9|r>>>23)+t|0)^t&((h=((h+=(t^i&(r^t))+n[15]-660478335)<<14|h>>>18)+r|0)^r))+n[4]-405537848)<<20|i>>>12)+h|0,i=((i+=((r=((r+=(i^h&((t=((t+=(h^r&(i^h))+n[9]+568446438)<<5|t>>>27)+i|0)^i))+n[14]-1019803690)<<9|r>>>23)+t|0)^t&((h=((h+=(t^i&(r^t))+n[3]-187363961)<<14|h>>>18)+r|0)^r))+n[8]+1163531501)<<20|i>>>12)+h|0,i=((i+=((r=((r+=(i^h&((t=((t+=(h^r&(i^h))+n[13]-1444681467)<<5|t>>>27)+i|0)^i))+n[2]-51403784)<<9|r>>>23)+t|0)^t&((h=((h+=(t^i&(r^t))+n[7]+1735328473)<<14|h>>>18)+r|0)^r))+n[12]-1926607734)<<20|i>>>12)+h|0,i=((i+=((e=(r=((r+=((s=i^h)^(t=((t+=(s^r)+n[5]-378558)<<4|t>>>28)+i|0))+n[8]-2022574463)<<11|r>>>21)+t|0)^t)^(h=((h+=(e^i)+n[11]+1839030562)<<16|h>>>16)+r|0))+n[14]-35309556)<<23|i>>>9)+h|0,i=((i+=((e=(r=((r+=((s=i^h)^(t=((t+=(s^r)+n[1]-1530992060)<<4|t>>>28)+i|0))+n[4]+1272893353)<<11|r>>>21)+t|0)^t)^(h=((h+=(e^i)+n[7]-155497632)<<16|h>>>16)+r|0))+n[10]-1094730640)<<23|i>>>9)+h|0,i=((i+=((e=(r=((r+=((s=i^h)^(t=((t+=(s^r)+n[13]+681279174)<<4|t>>>28)+i|0))+n[0]-358537222)<<11|r>>>21)+t|0)^t)^(h=((h+=(e^i)+n[3]-722521979)<<16|h>>>16)+r|0))+n[6]+76029189)<<23|i>>>9)+h|0,i=((i+=((e=(r=((r+=((s=i^h)^(t=((t+=(s^r)+n[9]-640364487)<<4|t>>>28)+i|0))+n[12]-421815835)<<11|r>>>21)+t|0)^t)^(h=((h+=(e^i)+n[15]+530742520)<<16|h>>>16)+r|0))+n[2]-995338651)<<23|i>>>9)+h|0,i=((i+=((r=((r+=(i^((t=((t+=(h^(i|~r))+n[0]-198630844)<<6|t>>>26)+i|0)|~h))+n[7]+1126891415)<<10|r>>>22)+t|0)^((h=((h+=(t^(r|~i))+n[14]-1416354905)<<15|h>>>17)+r|0)|~t))+n[5]-57434055)<<21|i>>>11)+h|0,i=((i+=((r=((r+=(i^((t=((t+=(h^(i|~r))+n[12]+1700485571)<<6|t>>>26)+i|0)|~h))+n[3]-1894986606)<<10|r>>>22)+t|0)^((h=((h+=(t^(r|~i))+n[10]-1051523)<<15|h>>>17)+r|0)|~t))+n[1]-2054922799)<<21|i>>>11)+h|0,i=((i+=((r=((r+=(i^((t=((t+=(h^(i|~r))+n[8]+1873313359)<<6|t>>>26)+i|0)|~h))+n[15]-30611744)<<10|r>>>22)+t|0)^((h=((h+=(t^(r|~i))+n[6]-1560198380)<<15|h>>>17)+r|0)|~t))+n[13]+1309151649)<<21|i>>>11)+h|0,i=((i+=((r=((r+=(i^((t=((t+=(h^(i|~r))+n[4]-145523070)<<6|t>>>26)+i|0)|~h))+n[11]-1120210379)<<10|r>>>22)+t|0)^((h=((h+=(t^(r|~i))+n[2]+718787259)<<15|h>>>17)+r|0)|~t))+n[9]-343485551)<<21|i>>>11)+h|0,this.first?(this.h0=t+1732584193|0,this.h1=i-271733879|0,this.h2=h-1732584194|0,this.h3=r+271733878|0,this.first=!1):(this.h0=this.h0+t|0,this.h1=this.h1+i|0,this.h2=this.h2+h|0,this.h3=this.h3+r|0)},c.prototype.hex=function(){this.finalize();var t=this.h0,i=this.h1,h=this.h2,r=this.h3;return n[t>>>4&15]+n[15&t]+n[t>>>12&15]+n[t>>>8&15]+n[t>>>20&15]+n[t>>>16&15]+n[t>>>28&15]+n[t>>>24&15]+n[i>>>4&15]+n[15&i]+n[i>>>12&15]+n[i>>>8&15]+n[i>>>20&15]+n[i>>>16&15]+n[i>>>28&15]+n[i>>>24&15]+n[h>>>4&15]+n[15&h]+n[h>>>12&15]+n[h>>>8&15]+n[h>>>20&15]+n[h>>>16&15]+n[h>>>28&15]+n[h>>>24&15]+n[r>>>4&15]+n[15&r]+n[r>>>12&15]+n[r>>>8&15]+n[r>>>20&15]+n[r>>>16&15]+n[r>>>28&15]+n[r>>>24&15]},c.prototype.toString=c.prototype.hex,c.prototype.digest=function(){this.finalize();var t=this.h0,i=this.h1,h=this.h2,r=this.h3;return[255&t,t>>>8&255,t>>>16&255,t>>>24&255,255&i,i>>>8&255,i>>>16&255,i>>>24&255,255&h,h>>>8&255,h>>>16&255,h>>>24&255,255&r,r>>>8&255,r>>>16&255,r>>>24&255]},c.prototype.array=c.prototype.digest,c.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(16),i=new Uint32Array(t);return i[0]=this.h0,i[1]=this.h1,i[2]=this.h2,i[3]=this.h3,t};var d=function(){var t=l("hex");t.create=function(){return new c},t.update=function(i){return t.create().update(i)};for(var i=0;i<o.length;++i){var h=o[i];t[h]=l(h)}return t}();d.md5=d,e?i.exports=d:r.md5=d}();var r=t(h.exports);export{r as default,r as md5};