@ocap/mcrypto 1.29.7 → 1.29.8

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,216 +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_inherits$1 = require('../../../inherits/inherits.cjs');
6
-
7
- //#region ../../node_modules/hash.js/lib/hash/utils.js
8
- var require_utils = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports) => {
9
- var assert = require_index.default;
10
- var inherits = require_inherits$1.default;
11
- exports.inherits = inherits;
12
- function isSurrogatePair(msg, i) {
13
- if ((msg.charCodeAt(i) & 64512) !== 55296) return false;
14
- if (i < 0 || i + 1 >= msg.length) return false;
15
- return (msg.charCodeAt(i + 1) & 64512) === 56320;
16
- }
17
- function toArray(msg, enc) {
18
- if (Array.isArray(msg)) return msg.slice();
19
- if (!msg) return [];
20
- var res = [];
21
- if (typeof msg === "string") {
22
- if (!enc) {
23
- var p = 0;
24
- for (var i = 0; i < msg.length; i++) {
25
- var c = msg.charCodeAt(i);
26
- if (c < 128) res[p++] = c;
27
- else if (c < 2048) {
28
- res[p++] = c >> 6 | 192;
29
- res[p++] = c & 63 | 128;
30
- } else if (isSurrogatePair(msg, i)) {
31
- c = 65536 + ((c & 1023) << 10) + (msg.charCodeAt(++i) & 1023);
32
- res[p++] = c >> 18 | 240;
33
- res[p++] = c >> 12 & 63 | 128;
34
- res[p++] = c >> 6 & 63 | 128;
35
- res[p++] = c & 63 | 128;
36
- } else {
37
- res[p++] = c >> 12 | 224;
38
- res[p++] = c >> 6 & 63 | 128;
39
- res[p++] = c & 63 | 128;
40
- }
41
- }
42
- } else if (enc === "hex") {
43
- msg = msg.replace(/[^a-z0-9]+/gi, "");
44
- if (msg.length % 2 !== 0) msg = "0" + msg;
45
- for (i = 0; i < msg.length; i += 2) res.push(parseInt(msg[i] + msg[i + 1], 16));
46
- }
47
- } else for (i = 0; i < msg.length; i++) res[i] = msg[i] | 0;
48
- return res;
49
- }
50
- exports.toArray = toArray;
51
- function toHex(msg) {
52
- var res = "";
53
- for (var i = 0; i < msg.length; i++) res += zero2(msg[i].toString(16));
54
- return res;
55
- }
56
- exports.toHex = toHex;
57
- function htonl(w) {
58
- return (w >>> 24 | w >>> 8 & 65280 | w << 8 & 16711680 | (w & 255) << 24) >>> 0;
59
- }
60
- exports.htonl = htonl;
61
- function toHex32(msg, endian) {
62
- var res = "";
63
- for (var i = 0; i < msg.length; i++) {
64
- var w = msg[i];
65
- if (endian === "little") w = htonl(w);
66
- res += zero8(w.toString(16));
67
- }
68
- return res;
69
- }
70
- exports.toHex32 = toHex32;
71
- function zero2(word) {
72
- if (word.length === 1) return "0" + word;
73
- else return word;
74
- }
75
- exports.zero2 = zero2;
76
- function zero8(word) {
77
- if (word.length === 7) return "0" + word;
78
- else if (word.length === 6) return "00" + word;
79
- else if (word.length === 5) return "000" + word;
80
- else if (word.length === 4) return "0000" + word;
81
- else if (word.length === 3) return "00000" + word;
82
- else if (word.length === 2) return "000000" + word;
83
- else if (word.length === 1) return "0000000" + word;
84
- else return word;
85
- }
86
- exports.zero8 = zero8;
87
- function join32(msg, start, end, endian) {
88
- var len = end - start;
89
- assert(len % 4 === 0);
90
- var res = new Array(len / 4);
91
- for (var i = 0, k = start; i < res.length; i++, k += 4) {
92
- var w;
93
- if (endian === "big") w = msg[k] << 24 | msg[k + 1] << 16 | msg[k + 2] << 8 | msg[k + 3];
94
- else w = msg[k + 3] << 24 | msg[k + 2] << 16 | msg[k + 1] << 8 | msg[k];
95
- res[i] = w >>> 0;
96
- }
97
- return res;
98
- }
99
- exports.join32 = join32;
100
- function split32(msg, endian) {
101
- var res = new Array(msg.length * 4);
102
- for (var i = 0, k = 0; i < msg.length; i++, k += 4) {
103
- var m = msg[i];
104
- if (endian === "big") {
105
- res[k] = m >>> 24;
106
- res[k + 1] = m >>> 16 & 255;
107
- res[k + 2] = m >>> 8 & 255;
108
- res[k + 3] = m & 255;
109
- } else {
110
- res[k + 3] = m >>> 24;
111
- res[k + 2] = m >>> 16 & 255;
112
- res[k + 1] = m >>> 8 & 255;
113
- res[k] = m & 255;
114
- }
115
- }
116
- return res;
117
- }
118
- exports.split32 = split32;
119
- function rotr32(w, b) {
120
- return w >>> b | w << 32 - b;
121
- }
122
- exports.rotr32 = rotr32;
123
- function rotl32(w, b) {
124
- return w << b | w >>> 32 - b;
125
- }
126
- exports.rotl32 = rotl32;
127
- function sum32(a, b) {
128
- return a + b >>> 0;
129
- }
130
- exports.sum32 = sum32;
131
- function sum32_3(a, b, c) {
132
- return a + b + c >>> 0;
133
- }
134
- exports.sum32_3 = sum32_3;
135
- function sum32_4(a, b, c, d) {
136
- return a + b + c + d >>> 0;
137
- }
138
- exports.sum32_4 = sum32_4;
139
- function sum32_5(a, b, c, d, e) {
140
- return a + b + c + d + e >>> 0;
141
- }
142
- exports.sum32_5 = sum32_5;
143
- function sum64(buf, pos, ah, al) {
144
- var bh = buf[pos];
145
- var lo = al + buf[pos + 1] >>> 0;
146
- buf[pos] = (lo < al ? 1 : 0) + ah + bh >>> 0;
147
- buf[pos + 1] = lo;
148
- }
149
- exports.sum64 = sum64;
150
- function sum64_hi(ah, al, bh, bl) {
151
- return (al + bl >>> 0 < al ? 1 : 0) + ah + bh >>> 0;
152
- }
153
- exports.sum64_hi = sum64_hi;
154
- function sum64_lo(ah, al, bh, bl) {
155
- return al + bl >>> 0;
156
- }
157
- exports.sum64_lo = sum64_lo;
158
- function sum64_4_hi(ah, al, bh, bl, ch, cl, dh, dl) {
159
- var carry = 0;
160
- var lo = al;
161
- lo = lo + bl >>> 0;
162
- carry += lo < al ? 1 : 0;
163
- lo = lo + cl >>> 0;
164
- carry += lo < cl ? 1 : 0;
165
- lo = lo + dl >>> 0;
166
- carry += lo < dl ? 1 : 0;
167
- return ah + bh + ch + dh + carry >>> 0;
168
- }
169
- exports.sum64_4_hi = sum64_4_hi;
170
- function sum64_4_lo(ah, al, bh, bl, ch, cl, dh, dl) {
171
- return al + bl + cl + dl >>> 0;
172
- }
173
- exports.sum64_4_lo = sum64_4_lo;
174
- function sum64_5_hi(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {
175
- var carry = 0;
176
- var lo = al;
177
- lo = lo + bl >>> 0;
178
- carry += lo < al ? 1 : 0;
179
- lo = lo + cl >>> 0;
180
- carry += lo < cl ? 1 : 0;
181
- lo = lo + dl >>> 0;
182
- carry += lo < dl ? 1 : 0;
183
- lo = lo + el >>> 0;
184
- carry += lo < el ? 1 : 0;
185
- return ah + bh + ch + dh + eh + carry >>> 0;
186
- }
187
- exports.sum64_5_hi = sum64_5_hi;
188
- function sum64_5_lo(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {
189
- return al + bl + cl + dl + el >>> 0;
190
- }
191
- exports.sum64_5_lo = sum64_5_lo;
192
- function rotr64_hi(ah, al, num) {
193
- return (al << 32 - num | ah >>> num) >>> 0;
194
- }
195
- exports.rotr64_hi = rotr64_hi;
196
- function rotr64_lo(ah, al, num) {
197
- return (ah << 32 - num | al >>> num) >>> 0;
198
- }
199
- exports.rotr64_lo = rotr64_lo;
200
- function shr64_hi(ah, al, num) {
201
- return ah >>> num;
202
- }
203
- exports.shr64_hi = shr64_hi;
204
- function shr64_lo(ah, al, num) {
205
- return (ah << 32 - num | al >>> num) >>> 0;
206
- }
207
- exports.shr64_lo = shr64_lo;
208
- }));
209
-
210
- //#endregion
211
- Object.defineProperty(exports, 'default', {
212
- enumerable: true,
213
- get: function () {
214
- return require_utils();
215
- }
216
- });
@@ -1,30 +0,0 @@
1
- const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.cjs');
2
- const require_utils$1 = require('./hash/utils.cjs');
3
- const require_common$1 = require('./hash/common.cjs');
4
- const require_sha$1 = require('./hash/sha.cjs');
5
- const require_ripemd$1 = require('./hash/ripemd.cjs');
6
- const require_hmac$1 = require('./hash/hmac.cjs');
7
-
8
- //#region ../../node_modules/hash.js/lib/hash.js
9
- var require_hash = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports) => {
10
- var hash = exports;
11
- hash.utils = require_utils$1.default;
12
- hash.common = require_common$1.default;
13
- hash.sha = require_sha$1.default;
14
- hash.ripemd = require_ripemd$1.default;
15
- hash.hmac = require_hmac$1.default;
16
- hash.sha1 = hash.sha.sha1;
17
- hash.sha256 = hash.sha.sha256;
18
- hash.sha224 = hash.sha.sha224;
19
- hash.sha384 = hash.sha.sha384;
20
- hash.sha512 = hash.sha.sha512;
21
- hash.ripemd160 = hash.ripemd.ripemd160;
22
- }));
23
-
24
- //#endregion
25
- Object.defineProperty(exports, 'default', {
26
- enumerable: true,
27
- get: function () {
28
- return require_hash();
29
- }
30
- });
@@ -1,23 +0,0 @@
1
- const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
- const require_inherits_browser$1 = require('./inherits_browser.cjs');
3
-
4
- //#region ../../node_modules/inherits/inherits.js
5
- var require_inherits = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
6
- try {
7
- var util = require("util");
8
- /* istanbul ignore next */
9
- if (typeof util.inherits !== "function") throw "";
10
- module.exports = util.inherits;
11
- } catch (e) {
12
- /* istanbul ignore next */
13
- module.exports = require_inherits_browser$1.default;
14
- }
15
- }));
16
-
17
- //#endregion
18
- Object.defineProperty(exports, 'default', {
19
- enumerable: true,
20
- get: function () {
21
- return require_inherits();
22
- }
23
- });
@@ -1,33 +0,0 @@
1
- const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
-
3
- //#region ../../node_modules/inherits/inherits_browser.js
4
- var require_inherits_browser = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
5
- if (typeof Object.create === "function") module.exports = function inherits(ctor, superCtor) {
6
- if (superCtor) {
7
- ctor.super_ = superCtor;
8
- ctor.prototype = Object.create(superCtor.prototype, { constructor: {
9
- value: ctor,
10
- enumerable: false,
11
- writable: true,
12
- configurable: true
13
- } });
14
- }
15
- };
16
- else module.exports = function inherits(ctor, superCtor) {
17
- if (superCtor) {
18
- ctor.super_ = superCtor;
19
- var TempCtor = function() {};
20
- TempCtor.prototype = superCtor.prototype;
21
- ctor.prototype = new TempCtor();
22
- ctor.prototype.constructor = ctor;
23
- }
24
- };
25
- }));
26
-
27
- //#endregion
28
- Object.defineProperty(exports, 'default', {
29
- enumerable: true,
30
- get: function () {
31
- return require_inherits_browser();
32
- }
33
- });
@@ -1,20 +0,0 @@
1
- const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
-
3
- //#region ../../node_modules/minimalistic-assert/index.js
4
- var require_minimalistic_assert = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exports, module) => {
5
- module.exports = assert;
6
- function assert(val, msg) {
7
- if (!val) throw new Error(msg || "Assertion failed");
8
- }
9
- assert.equal = function assertEqual(l, r, msg) {
10
- if (l != r) throw new Error(msg || "Assertion failed: " + l + " != " + r);
11
- };
12
- }));
13
-
14
- //#endregion
15
- Object.defineProperty(exports, 'default', {
16
- enumerable: true,
17
- get: function () {
18
- return require_minimalistic_assert();
19
- }
20
- });