You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

584 lines
24 KiB

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