@ocap/mcrypto 1.29.7 → 1.29.9

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 (35) hide show
  1. package/esm/signer/ed25519.mjs +2 -4
  2. package/lib/_virtual/rolldown_runtime.cjs +0 -2
  3. package/lib/signer/ed25519.cjs +2 -3
  4. package/package.json +3 -3
  5. package/esm/_virtual/rolldown_runtime.mjs +0 -32
  6. package/esm/node_modules/hash.js/lib/hash/common.mjs +0 -77
  7. package/esm/node_modules/hash.js/lib/hash/hmac.mjs +0 -41
  8. package/esm/node_modules/hash.js/lib/hash/ripemd.mjs +0 -422
  9. package/esm/node_modules/hash.js/lib/hash/sha/1.mjs +0 -73
  10. package/esm/node_modules/hash.js/lib/hash/sha/224.mjs +0 -38
  11. package/esm/node_modules/hash.js/lib/hash/sha/256.mjs +0 -154
  12. package/esm/node_modules/hash.js/lib/hash/sha/384.mjs +0 -46
  13. package/esm/node_modules/hash.js/lib/hash/sha/512.mjs +0 -389
  14. package/esm/node_modules/hash.js/lib/hash/sha/common.mjs +0 -46
  15. package/esm/node_modules/hash.js/lib/hash/sha.mjs +0 -20
  16. package/esm/node_modules/hash.js/lib/hash/utils.mjs +0 -211
  17. package/esm/node_modules/hash.js/lib/hash.mjs +0 -27
  18. package/esm/node_modules/inherits/inherits.mjs +0 -20
  19. package/esm/node_modules/inherits/inherits_browser.mjs +0 -30
  20. package/esm/node_modules/minimalistic-assert/index.mjs +0 -17
  21. package/lib/node_modules/hash.js/lib/hash/common.cjs +0 -82
  22. package/lib/node_modules/hash.js/lib/hash/hmac.cjs +0 -46
  23. package/lib/node_modules/hash.js/lib/hash/ripemd.cjs +0 -427
  24. package/lib/node_modules/hash.js/lib/hash/sha/1.cjs +0 -78
  25. package/lib/node_modules/hash.js/lib/hash/sha/224.cjs +0 -43
  26. package/lib/node_modules/hash.js/lib/hash/sha/256.cjs +0 -159
  27. package/lib/node_modules/hash.js/lib/hash/sha/384.cjs +0 -51
  28. package/lib/node_modules/hash.js/lib/hash/sha/512.cjs +0 -394
  29. package/lib/node_modules/hash.js/lib/hash/sha/common.cjs +0 -51
  30. package/lib/node_modules/hash.js/lib/hash/sha.cjs +0 -25
  31. package/lib/node_modules/hash.js/lib/hash/utils.cjs +0 -216
  32. package/lib/node_modules/hash.js/lib/hash.cjs +0 -30
  33. package/lib/node_modules/inherits/inherits.cjs +0 -23
  34. package/lib/node_modules/inherits/inherits_browser.cjs +0 -33
  35. package/lib/node_modules/minimalistic-assert/index.cjs +0 -20
@@ -1,51 +0,0 @@
1
- 'use strict';
2
-
3
- const require_rolldown_runtime = require('../../../../../_virtual/rolldown_runtime.cjs');
4
- const require_utils$1 = require('../utils.cjs');
5
- const require_512 = require('./512.cjs');
6
-
7
- //#region ../../node_modules/hash.js/lib/hash/sha/384.js
8
- var require__384 = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
9
- var utils = require_utils$1.default;
10
- var SHA512 = require_512.default;
11
- function SHA384() {
12
- if (!(this instanceof SHA384)) return new SHA384();
13
- SHA512.call(this);
14
- this.h = [
15
- 3418070365,
16
- 3238371032,
17
- 1654270250,
18
- 914150663,
19
- 2438529370,
20
- 812702999,
21
- 355462360,
22
- 4144912697,
23
- 1731405415,
24
- 4290775857,
25
- 2394180231,
26
- 1750603025,
27
- 3675008525,
28
- 1694076839,
29
- 1203062813,
30
- 3204075428
31
- ];
32
- }
33
- utils.inherits(SHA384, SHA512);
34
- module.exports = SHA384;
35
- SHA384.blockSize = 1024;
36
- SHA384.outSize = 384;
37
- SHA384.hmacStrength = 192;
38
- SHA384.padLength = 128;
39
- SHA384.prototype._digest = function digest(enc) {
40
- if (enc === "hex") return utils.toHex32(this.h.slice(0, 12), "big");
41
- else return utils.split32(this.h.slice(0, 12), "big");
42
- };
43
- }));
44
-
45
- //#endregion
46
- Object.defineProperty(exports, 'default', {
47
- enumerable: true,
48
- get: function () {
49
- return require__384();
50
- }
51
- });
@@ -1,394 +0,0 @@
1
- 'use strict';
2
-
3
- const require_rolldown_runtime = require('../../../../../_virtual/rolldown_runtime.cjs');
4
- const require_index = require('../../../../minimalistic-assert/index.cjs');
5
- const require_utils$1 = require('../utils.cjs');
6
- const require_common$1 = require('../common.cjs');
7
-
8
- //#region ../../node_modules/hash.js/lib/hash/sha/512.js
9
- var require__512 = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
10
- var utils = require_utils$1.default;
11
- var common = require_common$1.default;
12
- var assert = require_index.default;
13
- var rotr64_hi = utils.rotr64_hi;
14
- var rotr64_lo = utils.rotr64_lo;
15
- var shr64_hi = utils.shr64_hi;
16
- var shr64_lo = utils.shr64_lo;
17
- var sum64 = utils.sum64;
18
- var sum64_hi = utils.sum64_hi;
19
- var sum64_lo = utils.sum64_lo;
20
- var sum64_4_hi = utils.sum64_4_hi;
21
- var sum64_4_lo = utils.sum64_4_lo;
22
- var sum64_5_hi = utils.sum64_5_hi;
23
- var sum64_5_lo = utils.sum64_5_lo;
24
- var BlockHash = common.BlockHash;
25
- var sha512_K = [
26
- 1116352408,
27
- 3609767458,
28
- 1899447441,
29
- 602891725,
30
- 3049323471,
31
- 3964484399,
32
- 3921009573,
33
- 2173295548,
34
- 961987163,
35
- 4081628472,
36
- 1508970993,
37
- 3053834265,
38
- 2453635748,
39
- 2937671579,
40
- 2870763221,
41
- 3664609560,
42
- 3624381080,
43
- 2734883394,
44
- 310598401,
45
- 1164996542,
46
- 607225278,
47
- 1323610764,
48
- 1426881987,
49
- 3590304994,
50
- 1925078388,
51
- 4068182383,
52
- 2162078206,
53
- 991336113,
54
- 2614888103,
55
- 633803317,
56
- 3248222580,
57
- 3479774868,
58
- 3835390401,
59
- 2666613458,
60
- 4022224774,
61
- 944711139,
62
- 264347078,
63
- 2341262773,
64
- 604807628,
65
- 2007800933,
66
- 770255983,
67
- 1495990901,
68
- 1249150122,
69
- 1856431235,
70
- 1555081692,
71
- 3175218132,
72
- 1996064986,
73
- 2198950837,
74
- 2554220882,
75
- 3999719339,
76
- 2821834349,
77
- 766784016,
78
- 2952996808,
79
- 2566594879,
80
- 3210313671,
81
- 3203337956,
82
- 3336571891,
83
- 1034457026,
84
- 3584528711,
85
- 2466948901,
86
- 113926993,
87
- 3758326383,
88
- 338241895,
89
- 168717936,
90
- 666307205,
91
- 1188179964,
92
- 773529912,
93
- 1546045734,
94
- 1294757372,
95
- 1522805485,
96
- 1396182291,
97
- 2643833823,
98
- 1695183700,
99
- 2343527390,
100
- 1986661051,
101
- 1014477480,
102
- 2177026350,
103
- 1206759142,
104
- 2456956037,
105
- 344077627,
106
- 2730485921,
107
- 1290863460,
108
- 2820302411,
109
- 3158454273,
110
- 3259730800,
111
- 3505952657,
112
- 3345764771,
113
- 106217008,
114
- 3516065817,
115
- 3606008344,
116
- 3600352804,
117
- 1432725776,
118
- 4094571909,
119
- 1467031594,
120
- 275423344,
121
- 851169720,
122
- 430227734,
123
- 3100823752,
124
- 506948616,
125
- 1363258195,
126
- 659060556,
127
- 3750685593,
128
- 883997877,
129
- 3785050280,
130
- 958139571,
131
- 3318307427,
132
- 1322822218,
133
- 3812723403,
134
- 1537002063,
135
- 2003034995,
136
- 1747873779,
137
- 3602036899,
138
- 1955562222,
139
- 1575990012,
140
- 2024104815,
141
- 1125592928,
142
- 2227730452,
143
- 2716904306,
144
- 2361852424,
145
- 442776044,
146
- 2428436474,
147
- 593698344,
148
- 2756734187,
149
- 3733110249,
150
- 3204031479,
151
- 2999351573,
152
- 3329325298,
153
- 3815920427,
154
- 3391569614,
155
- 3928383900,
156
- 3515267271,
157
- 566280711,
158
- 3940187606,
159
- 3454069534,
160
- 4118630271,
161
- 4000239992,
162
- 116418474,
163
- 1914138554,
164
- 174292421,
165
- 2731055270,
166
- 289380356,
167
- 3203993006,
168
- 460393269,
169
- 320620315,
170
- 685471733,
171
- 587496836,
172
- 852142971,
173
- 1086792851,
174
- 1017036298,
175
- 365543100,
176
- 1126000580,
177
- 2618297676,
178
- 1288033470,
179
- 3409855158,
180
- 1501505948,
181
- 4234509866,
182
- 1607167915,
183
- 987167468,
184
- 1816402316,
185
- 1246189591
186
- ];
187
- function SHA512() {
188
- if (!(this instanceof SHA512)) return new SHA512();
189
- BlockHash.call(this);
190
- this.h = [
191
- 1779033703,
192
- 4089235720,
193
- 3144134277,
194
- 2227873595,
195
- 1013904242,
196
- 4271175723,
197
- 2773480762,
198
- 1595750129,
199
- 1359893119,
200
- 2917565137,
201
- 2600822924,
202
- 725511199,
203
- 528734635,
204
- 4215389547,
205
- 1541459225,
206
- 327033209
207
- ];
208
- this.k = sha512_K;
209
- this.W = new Array(160);
210
- }
211
- utils.inherits(SHA512, BlockHash);
212
- module.exports = SHA512;
213
- SHA512.blockSize = 1024;
214
- SHA512.outSize = 512;
215
- SHA512.hmacStrength = 192;
216
- SHA512.padLength = 128;
217
- SHA512.prototype._prepareBlock = function _prepareBlock(msg, start) {
218
- var W = this.W;
219
- for (var i = 0; i < 32; i++) W[i] = msg[start + i];
220
- for (; i < W.length; i += 2) {
221
- var c0_hi = g1_512_hi(W[i - 4], W[i - 3]);
222
- var c0_lo = g1_512_lo(W[i - 4], W[i - 3]);
223
- var c1_hi = W[i - 14];
224
- var c1_lo = W[i - 13];
225
- var c2_hi = g0_512_hi(W[i - 30], W[i - 29]);
226
- var c2_lo = g0_512_lo(W[i - 30], W[i - 29]);
227
- var c3_hi = W[i - 32];
228
- var c3_lo = W[i - 31];
229
- W[i] = sum64_4_hi(c0_hi, c0_lo, c1_hi, c1_lo, c2_hi, c2_lo, c3_hi, c3_lo);
230
- W[i + 1] = sum64_4_lo(c0_hi, c0_lo, c1_hi, c1_lo, c2_hi, c2_lo, c3_hi, c3_lo);
231
- }
232
- };
233
- SHA512.prototype._update = function _update(msg, start) {
234
- this._prepareBlock(msg, start);
235
- var W = this.W;
236
- var ah = this.h[0];
237
- var al = this.h[1];
238
- var bh = this.h[2];
239
- var bl = this.h[3];
240
- var ch = this.h[4];
241
- var cl = this.h[5];
242
- var dh = this.h[6];
243
- var dl = this.h[7];
244
- var eh = this.h[8];
245
- var el = this.h[9];
246
- var fh = this.h[10];
247
- var fl = this.h[11];
248
- var gh = this.h[12];
249
- var gl = this.h[13];
250
- var hh = this.h[14];
251
- var hl = this.h[15];
252
- assert(this.k.length === W.length);
253
- for (var i = 0; i < W.length; i += 2) {
254
- var c0_hi = hh;
255
- var c0_lo = hl;
256
- var c1_hi = s1_512_hi(eh, el);
257
- var c1_lo = s1_512_lo(eh, el);
258
- var c2_hi = ch64_hi(eh, el, fh, fl, gh, gl);
259
- var c2_lo = ch64_lo(eh, el, fh, fl, gh, gl);
260
- var c3_hi = this.k[i];
261
- var c3_lo = this.k[i + 1];
262
- var c4_hi = W[i];
263
- var c4_lo = W[i + 1];
264
- var T1_hi = sum64_5_hi(c0_hi, c0_lo, c1_hi, c1_lo, c2_hi, c2_lo, c3_hi, c3_lo, c4_hi, c4_lo);
265
- var T1_lo = sum64_5_lo(c0_hi, c0_lo, c1_hi, c1_lo, c2_hi, c2_lo, c3_hi, c3_lo, c4_hi, c4_lo);
266
- c0_hi = s0_512_hi(ah, al);
267
- c0_lo = s0_512_lo(ah, al);
268
- c1_hi = maj64_hi(ah, al, bh, bl, ch, cl);
269
- c1_lo = maj64_lo(ah, al, bh, bl, ch, cl);
270
- var T2_hi = sum64_hi(c0_hi, c0_lo, c1_hi, c1_lo);
271
- var T2_lo = sum64_lo(c0_hi, c0_lo, c1_hi, c1_lo);
272
- hh = gh;
273
- hl = gl;
274
- gh = fh;
275
- gl = fl;
276
- fh = eh;
277
- fl = el;
278
- eh = sum64_hi(dh, dl, T1_hi, T1_lo);
279
- el = sum64_lo(dl, dl, T1_hi, T1_lo);
280
- dh = ch;
281
- dl = cl;
282
- ch = bh;
283
- cl = bl;
284
- bh = ah;
285
- bl = al;
286
- ah = sum64_hi(T1_hi, T1_lo, T2_hi, T2_lo);
287
- al = sum64_lo(T1_hi, T1_lo, T2_hi, T2_lo);
288
- }
289
- sum64(this.h, 0, ah, al);
290
- sum64(this.h, 2, bh, bl);
291
- sum64(this.h, 4, ch, cl);
292
- sum64(this.h, 6, dh, dl);
293
- sum64(this.h, 8, eh, el);
294
- sum64(this.h, 10, fh, fl);
295
- sum64(this.h, 12, gh, gl);
296
- sum64(this.h, 14, hh, hl);
297
- };
298
- SHA512.prototype._digest = function digest(enc) {
299
- if (enc === "hex") return utils.toHex32(this.h, "big");
300
- else return utils.split32(this.h, "big");
301
- };
302
- function ch64_hi(xh, xl, yh, yl, zh) {
303
- var r = xh & yh ^ ~xh & zh;
304
- if (r < 0) r += 4294967296;
305
- return r;
306
- }
307
- function ch64_lo(xh, xl, yh, yl, zh, zl) {
308
- var r = xl & yl ^ ~xl & zl;
309
- if (r < 0) r += 4294967296;
310
- return r;
311
- }
312
- function maj64_hi(xh, xl, yh, yl, zh) {
313
- var r = xh & yh ^ xh & zh ^ yh & zh;
314
- if (r < 0) r += 4294967296;
315
- return r;
316
- }
317
- function maj64_lo(xh, xl, yh, yl, zh, zl) {
318
- var r = xl & yl ^ xl & zl ^ yl & zl;
319
- if (r < 0) r += 4294967296;
320
- return r;
321
- }
322
- function s0_512_hi(xh, xl) {
323
- var c0_hi = rotr64_hi(xh, xl, 28);
324
- var c1_hi = rotr64_hi(xl, xh, 2);
325
- var c2_hi = rotr64_hi(xl, xh, 7);
326
- var r = c0_hi ^ c1_hi ^ c2_hi;
327
- if (r < 0) r += 4294967296;
328
- return r;
329
- }
330
- function s0_512_lo(xh, xl) {
331
- var c0_lo = rotr64_lo(xh, xl, 28);
332
- var c1_lo = rotr64_lo(xl, xh, 2);
333
- var c2_lo = rotr64_lo(xl, xh, 7);
334
- var r = c0_lo ^ c1_lo ^ c2_lo;
335
- if (r < 0) r += 4294967296;
336
- return r;
337
- }
338
- function s1_512_hi(xh, xl) {
339
- var c0_hi = rotr64_hi(xh, xl, 14);
340
- var c1_hi = rotr64_hi(xh, xl, 18);
341
- var c2_hi = rotr64_hi(xl, xh, 9);
342
- var r = c0_hi ^ c1_hi ^ c2_hi;
343
- if (r < 0) r += 4294967296;
344
- return r;
345
- }
346
- function s1_512_lo(xh, xl) {
347
- var c0_lo = rotr64_lo(xh, xl, 14);
348
- var c1_lo = rotr64_lo(xh, xl, 18);
349
- var c2_lo = rotr64_lo(xl, xh, 9);
350
- var r = c0_lo ^ c1_lo ^ c2_lo;
351
- if (r < 0) r += 4294967296;
352
- return r;
353
- }
354
- function g0_512_hi(xh, xl) {
355
- var c0_hi = rotr64_hi(xh, xl, 1);
356
- var c1_hi = rotr64_hi(xh, xl, 8);
357
- var c2_hi = shr64_hi(xh, xl, 7);
358
- var r = c0_hi ^ c1_hi ^ c2_hi;
359
- if (r < 0) r += 4294967296;
360
- return r;
361
- }
362
- function g0_512_lo(xh, xl) {
363
- var c0_lo = rotr64_lo(xh, xl, 1);
364
- var c1_lo = rotr64_lo(xh, xl, 8);
365
- var c2_lo = shr64_lo(xh, xl, 7);
366
- var r = c0_lo ^ c1_lo ^ c2_lo;
367
- if (r < 0) r += 4294967296;
368
- return r;
369
- }
370
- function g1_512_hi(xh, xl) {
371
- var c0_hi = rotr64_hi(xh, xl, 19);
372
- var c1_hi = rotr64_hi(xl, xh, 29);
373
- var c2_hi = shr64_hi(xh, xl, 6);
374
- var r = c0_hi ^ c1_hi ^ c2_hi;
375
- if (r < 0) r += 4294967296;
376
- return r;
377
- }
378
- function g1_512_lo(xh, xl) {
379
- var c0_lo = rotr64_lo(xh, xl, 19);
380
- var c1_lo = rotr64_lo(xl, xh, 29);
381
- var c2_lo = shr64_lo(xh, xl, 6);
382
- var r = c0_lo ^ c1_lo ^ c2_lo;
383
- if (r < 0) r += 4294967296;
384
- return r;
385
- }
386
- }));
387
-
388
- //#endregion
389
- Object.defineProperty(exports, 'default', {
390
- enumerable: true,
391
- get: function () {
392
- return require__512();
393
- }
394
- });
@@ -1,51 +0,0 @@
1
- 'use strict';
2
-
3
- const require_rolldown_runtime = require('../../../../../_virtual/rolldown_runtime.cjs');
4
- const require_utils$1 = require('../utils.cjs');
5
-
6
- //#region ../../node_modules/hash.js/lib/hash/sha/common.js
7
- var require_common = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports) => {
8
- var rotr32 = require_utils$1.default.rotr32;
9
- function ft_1(s, x, y, z) {
10
- if (s === 0) return ch32(x, y, z);
11
- if (s === 1 || s === 3) return p32(x, y, z);
12
- if (s === 2) return maj32(x, y, z);
13
- }
14
- exports.ft_1 = ft_1;
15
- function ch32(x, y, z) {
16
- return x & y ^ ~x & z;
17
- }
18
- exports.ch32 = ch32;
19
- function maj32(x, y, z) {
20
- return x & y ^ x & z ^ y & z;
21
- }
22
- exports.maj32 = maj32;
23
- function p32(x, y, z) {
24
- return x ^ y ^ z;
25
- }
26
- exports.p32 = p32;
27
- function s0_256(x) {
28
- return rotr32(x, 2) ^ rotr32(x, 13) ^ rotr32(x, 22);
29
- }
30
- exports.s0_256 = s0_256;
31
- function s1_256(x) {
32
- return rotr32(x, 6) ^ rotr32(x, 11) ^ rotr32(x, 25);
33
- }
34
- exports.s1_256 = s1_256;
35
- function g0_256(x) {
36
- return rotr32(x, 7) ^ rotr32(x, 18) ^ x >>> 3;
37
- }
38
- exports.g0_256 = g0_256;
39
- function g1_256(x) {
40
- return rotr32(x, 17) ^ rotr32(x, 19) ^ x >>> 10;
41
- }
42
- exports.g1_256 = g1_256;
43
- }));
44
-
45
- //#endregion
46
- Object.defineProperty(exports, 'default', {
47
- enumerable: true,
48
- get: function () {
49
- return require_common();
50
- }
51
- });
@@ -1,25 +0,0 @@
1
- 'use strict';
2
-
3
- const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
4
- const require_1 = require('./sha/1.cjs');
5
- const require_256 = require('./sha/256.cjs');
6
- const require_224 = require('./sha/224.cjs');
7
- const require_512 = require('./sha/512.cjs');
8
- const require_384 = require('./sha/384.cjs');
9
-
10
- //#region ../../node_modules/hash.js/lib/hash/sha.js
11
- var require_sha = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports) => {
12
- exports.sha1 = require_1.default;
13
- exports.sha224 = require_224.default;
14
- exports.sha256 = require_256.default;
15
- exports.sha384 = require_384.default;
16
- exports.sha512 = require_512.default;
17
- }));
18
-
19
- //#endregion
20
- Object.defineProperty(exports, 'default', {
21
- enumerable: true,
22
- get: function () {
23
- return require_sha();
24
- }
25
- });