@private.me/xbind 1.3.5 → 3.0.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.
- package/LICENSES.md +212 -0
- package/README.md +388 -6
- package/dist-standalone/_deps/mldsa-wasm/dist/mldsa.js +1 -1920
- package/dist-standalone/_deps/shared/cjs/errors.js +1 -639
- package/dist-standalone/_deps/shared/cjs/index.js +1 -496
- package/dist-standalone/_deps/shared/cjs/types.js +1 -317
- package/dist-standalone/_deps/shared/errors.js +1 -255
- package/dist-standalone/_deps/shared/index.js +1 -74
- package/dist-standalone/_deps/shared/types.js +1 -90
- package/dist-standalone/_deps/ux-helpers/cjs/errors.js +1 -1
- package/dist-standalone/_deps/ux-helpers/cjs/index.js +1 -1
- package/dist-standalone/_deps/ux-helpers/cjs/pagination.js +1 -1
- package/dist-standalone/_deps/ux-helpers/cjs/progress.js +1 -1
- package/dist-standalone/_deps/ux-helpers/cjs/search.js +1 -1
- package/dist-standalone/_deps/ux-helpers/cjs/types.js +1 -1
- package/dist-standalone/_deps/ux-helpers/errors.js +1 -1
- package/dist-standalone/_deps/ux-helpers/index.js +1 -1
- package/dist-standalone/_deps/ux-helpers/pagination.js +1 -1
- package/dist-standalone/_deps/ux-helpers/progress.js +1 -1
- package/dist-standalone/_deps/ux-helpers/search.js +1 -1
- package/dist-standalone/_deps/xchange/auto-accept.js +1 -1
- package/dist-standalone/_deps/xchange/cjs/auto-accept.js +1 -1
- package/dist-standalone/_deps/xchange/cjs/errors.js +1 -1
- package/dist-standalone/_deps/xchange/cjs/index.js +1 -1
- package/dist-standalone/_deps/xchange/cjs/invite-client.js +1 -1
- package/dist-standalone/_deps/xchange/cjs/lazy-init.js +1 -1
- package/dist-standalone/_deps/xchange/cjs/trust-integration.js +1 -1
- package/dist-standalone/_deps/xchange/cjs/xchange.js +1 -1
- package/dist-standalone/_deps/xchange/errors.js +1 -1
- package/dist-standalone/_deps/xchange/index.js +1 -1
- package/dist-standalone/_deps/xchange/invite-client.js +1 -1
- package/dist-standalone/_deps/xchange/lazy-init.js +1 -1
- package/dist-standalone/_deps/xchange/trust-integration.js +1 -1
- package/dist-standalone/_deps/xchange/xchange.js +1 -1
- package/dist-standalone/_deps/xregistry/cjs/discovery.js +1 -1
- package/dist-standalone/_deps/xregistry/cjs/errors.js +1 -1
- package/dist-standalone/_deps/xregistry/cjs/index.js +1 -1
- package/dist-standalone/_deps/xregistry/cjs/registry.js +1 -1
- package/dist-standalone/_deps/xregistry/cjs/schema.js +1 -1
- package/dist-standalone/_deps/xregistry/cjs/types.js +1 -1
- package/dist-standalone/_deps/xregistry/discovery.js +1 -1
- package/dist-standalone/_deps/xregistry/errors.js +1 -1
- package/dist-standalone/_deps/xregistry/index.js +1 -1
- package/dist-standalone/_deps/xregistry/registry.js +1 -1
- package/dist-standalone/_deps/xregistry/schema.js +1 -1
- package/dist-standalone/_deps/xregistry/types.js +1 -1
- package/dist-standalone/agent-call.js +1 -642
- package/dist-standalone/agent-sdk.js +1 -328
- package/dist-standalone/agent.d.ts +95 -5
- package/dist-standalone/agent.js +1 -1545
- package/dist-standalone/approval.js +1 -193
- package/dist-standalone/async-iterators.d.ts +275 -0
- package/dist-standalone/async-iterators.js +1 -0
- package/dist-standalone/auth.js +1 -219
- package/dist-standalone/auto-accept.js +1 -229
- package/dist-standalone/backup-config.js +1 -201
- package/dist-standalone/backup.d.ts +114 -0
- package/dist-standalone/backup.js +1 -0
- package/dist-standalone/batch-operations.d.ts +297 -0
- package/dist-standalone/batch-operations.js +1 -0
- package/dist-standalone/cancellation.d.ts +301 -0
- package/dist-standalone/cancellation.js +1 -0
- package/dist-standalone/checkpoint.js +1 -186
- package/dist-standalone/circuit-breaker.d.ts +351 -0
- package/dist-standalone/circuit-breaker.js +1 -0
- package/dist-standalone/cjs/agent-call.js +1 -651
- package/dist-standalone/cjs/agent-sdk.js +1 -332
- package/dist-standalone/cjs/agent.js +1 -1582
- package/dist-standalone/cjs/approval.js +1 -199
- package/dist-standalone/cjs/async-iterators.js +1 -0
- package/dist-standalone/cjs/auth.js +1 -225
- package/dist-standalone/cjs/auto-accept.js +1 -233
- package/dist-standalone/cjs/backup-config.js +1 -207
- package/dist-standalone/cjs/backup.js +1 -0
- package/dist-standalone/cjs/batch-operations.js +1 -0
- package/dist-standalone/cjs/cancellation.js +1 -0
- package/dist-standalone/cjs/checkpoint.js +1 -193
- package/dist-standalone/cjs/circuit-breaker.js +1 -0
- package/dist-standalone/cjs/cli/init.js +1 -486
- package/dist-standalone/cjs/config-validation.js +1 -0
- package/dist-standalone/cjs/connect.js +1 -312
- package/dist-standalone/cjs/connection-pool.js +1 -0
- package/dist-standalone/cjs/correlation-id.js +1 -339
- package/dist-standalone/cjs/crypto-utils.js +1 -0
- package/dist-standalone/cjs/debug-mode.js +1 -0
- package/dist-standalone/cjs/did-document.js +1 -101
- package/dist-standalone/cjs/did-privateme.js +1 -130
- package/dist-standalone/cjs/did-web.js +1 -201
- package/dist-standalone/cjs/discovery.js +1 -462
- package/dist-standalone/cjs/dual-mode.js +1 -251
- package/dist-standalone/cjs/email-templates.js +1 -313
- package/dist-standalone/cjs/email-transport.js +1 -239
- package/dist-standalone/cjs/envelope.js +1 -510
- package/dist-standalone/cjs/errors.js +1 -826
- package/dist-standalone/cjs/event-emitter.js +1 -0
- package/dist-standalone/cjs/gateway-state.js +1 -55
- package/dist-standalone/cjs/gateway-transport.js +1 -120
- package/dist-standalone/cjs/graceful-degradation.js +1 -0
- package/dist-standalone/cjs/guardrails.js +1 -223
- package/dist-standalone/cjs/health-check.js +1 -0
- package/dist-standalone/cjs/http-compat.js +1 -272
- package/dist-standalone/cjs/http-status-map.js +1 -571
- package/dist-standalone/cjs/identity.js +1 -540
- package/dist-standalone/cjs/index.js +1 -237
- package/dist-standalone/cjs/invitation.js +1 -421
- package/dist-standalone/cjs/invite.js +1 -328
- package/dist-standalone/cjs/key-agreement.js +1 -246
- package/dist-standalone/cjs/lazy-init.js +1 -300
- package/dist-standalone/cjs/logger.js +1 -0
- package/dist-standalone/cjs/mdns-discovery.js +1 -202
- package/dist-standalone/cjs/nonce-store.js +1 -66
- package/dist-standalone/cjs/pairing-manager.js +1 -223
- package/dist-standalone/cjs/plugin-system.js +1 -0
- package/dist-standalone/cjs/plugins/logging.js +1 -0
- package/dist-standalone/cjs/plugins/metrics.js +1 -0
- package/dist-standalone/cjs/plugins/validation.js +1 -0
- package/dist-standalone/cjs/policy.js +1 -320
- package/dist-standalone/cjs/progress-callbacks.js +1 -0
- package/dist-standalone/cjs/redis-nonce-store.js +1 -76
- package/dist-standalone/cjs/registry-middleware.js +1 -50
- package/dist-standalone/cjs/retry-strategies.js +1 -0
- package/dist-standalone/cjs/retry-transport.js +1 -102
- package/dist-standalone/cjs/runtime/browser.js +1 -0
- package/dist-standalone/cjs/runtime/edge.js +1 -0
- package/dist-standalone/cjs/runtime/react-native.js +1 -0
- package/dist-standalone/cjs/security-policy.js +1 -245
- package/dist-standalone/cjs/serialization.js +1 -0
- package/dist-standalone/cjs/split-channel.js +1 -177
- package/dist-standalone/cjs/subscription-proof.js +1 -230
- package/dist-standalone/cjs/succession.js +1 -148
- package/dist-standalone/cjs/timeouts.js +1 -0
- package/dist-standalone/cjs/trace-context.js +1 -0
- package/dist-standalone/cjs/trace-spans.js +1 -0
- package/dist-standalone/cjs/transport.js +1 -63
- package/dist-standalone/cjs/trust-registry.js +1 -742
- package/dist-standalone/cjs/types/error-response.js +1 -56
- package/dist-standalone/cjs/vault-auth.js +1 -0
- package/dist-standalone/cjs/vault-store-loader.js +1 -0
- package/dist-standalone/cjs/verify.js +1 -25
- package/dist-standalone/cjs/version-info.js +1 -0
- package/dist-standalone/cjs/xfetch.js +1 -252
- package/dist-standalone/cli/init.js +1 -449
- package/dist-standalone/cli/setup.js +1 -514
- package/dist-standalone/cli/types.js +1 -27
- package/dist-standalone/cli/xbind.js +1 -148
- package/dist-standalone/config-validation.d.ts +185 -0
- package/dist-standalone/config-validation.js +1 -0
- package/dist-standalone/connect.js +1 -274
- package/dist-standalone/connection-pool.d.ts +251 -0
- package/dist-standalone/connection-pool.js +1 -0
- package/dist-standalone/correlation-id.js +1 -326
- package/dist-standalone/crypto-utils.d.ts +60 -0
- package/dist-standalone/crypto-utils.js +1 -0
- package/dist-standalone/debug-mode.d.ts +286 -0
- package/dist-standalone/debug-mode.js +1 -0
- package/dist-standalone/did-document.js +1 -96
- package/dist-standalone/did-privateme.js +1 -121
- package/dist-standalone/did-web.js +1 -196
- package/dist-standalone/discovery.js +1 -458
- package/dist-standalone/dual-mode.js +1 -247
- package/dist-standalone/email-templates.js +1 -309
- package/dist-standalone/email-transport.js +1 -232
- package/dist-standalone/envelope.d.ts +29 -1
- package/dist-standalone/envelope.js +1 -497
- package/dist-standalone/errors.d.ts +10 -0
- package/dist-standalone/errors.js +1 -811
- package/dist-standalone/event-emitter.d.ts +395 -0
- package/dist-standalone/event-emitter.js +1 -0
- package/dist-standalone/gateway-state.js +1 -51
- package/dist-standalone/gateway-transport.js +1 -116
- package/dist-standalone/graceful-degradation.d.ts +246 -0
- package/dist-standalone/graceful-degradation.js +1 -0
- package/dist-standalone/guardrails.js +1 -216
- package/dist-standalone/health-check.d.ts +150 -0
- package/dist-standalone/health-check.js +1 -0
- package/dist-standalone/http-compat.js +1 -267
- package/dist-standalone/http-status-map.js +1 -561
- package/dist-standalone/identity.d.ts +64 -1
- package/dist-standalone/identity.js +1 -515
- package/dist-standalone/index.d.ts +45 -3
- package/dist-standalone/index.js +1 -52
- package/dist-standalone/invitation.js +1 -415
- package/dist-standalone/invite.js +1 -324
- package/dist-standalone/key-agreement.d.ts +61 -13
- package/dist-standalone/key-agreement.js +1 -236
- package/dist-standalone/lazy-init.js +1 -295
- package/dist-standalone/logger.d.ts +77 -0
- package/dist-standalone/logger.js +1 -0
- package/dist-standalone/mdns-discovery.js +1 -195
- package/dist-standalone/nonce-store.d.ts +16 -3
- package/dist-standalone/nonce-store.js +1 -62
- package/dist-standalone/package.json +0 -1
- package/dist-standalone/pairing-manager.js +1 -219
- package/dist-standalone/plugin-system.d.ts +145 -0
- package/dist-standalone/plugin-system.js +1 -0
- package/dist-standalone/policy.js +1 -315
- package/dist-standalone/progress-callbacks.d.ts +394 -0
- package/dist-standalone/progress-callbacks.js +1 -0
- package/dist-standalone/redis-nonce-store.js +1 -72
- package/dist-standalone/registry-middleware.js +1 -47
- package/dist-standalone/retry-strategies.d.ts +382 -0
- package/dist-standalone/retry-strategies.js +1 -0
- package/dist-standalone/retry-transport.js +1 -98
- package/dist-standalone/security-policy.js +1 -239
- package/dist-standalone/serialization.d.ts +244 -0
- package/dist-standalone/serialization.js +1 -0
- package/dist-standalone/split-channel.d.ts +49 -1
- package/dist-standalone/split-channel.js +1 -171
- package/dist-standalone/subscription-proof.js +1 -224
- package/dist-standalone/succession.js +1 -142
- package/dist-standalone/timeouts.d.ts +275 -0
- package/dist-standalone/timeouts.js +1 -0
- package/dist-standalone/trace-context.d.ts +252 -0
- package/dist-standalone/trace-context.js +1 -0
- package/dist-standalone/trace-spans.d.ts +360 -0
- package/dist-standalone/trace-spans.js +1 -0
- package/dist-standalone/transport.js +1 -59
- package/dist-standalone/trust-registry.d.ts +106 -5
- package/dist-standalone/trust-registry.js +1 -702
- package/dist-standalone/vault-auth.d.ts +91 -0
- package/dist-standalone/vault-auth.js +1 -0
- package/dist-standalone/vault-store-loader.d.ts +110 -0
- package/dist-standalone/vault-store-loader.js +1 -0
- package/dist-standalone/verify.js +1 -16
- package/dist-standalone/version-info.d.ts +259 -0
- package/dist-standalone/version-info.js +1 -0
- package/dist-standalone/xfetch.js +1 -247
- package/llms.txt +1 -0
- package/package.json +65 -5
- package/share1.dat +0 -0
- package/dist-standalone/_deps/crypto/base64.d.ts +0 -29
- package/dist-standalone/_deps/crypto/base64.js +0 -222
- package/dist-standalone/_deps/crypto/cjs/base64.js +0 -665
- package/dist-standalone/_deps/crypto/cjs/errors.js +0 -675
- package/dist-standalone/_deps/crypto/cjs/hmac.js +0 -473
- package/dist-standalone/_deps/crypto/cjs/index.js +0 -852
- package/dist-standalone/_deps/crypto/cjs/package.json +0 -1
- package/dist-standalone/_deps/crypto/cjs/padding.js +0 -511
- package/dist-standalone/_deps/crypto/cjs/share-header.js +0 -372
- package/dist-standalone/_deps/crypto/cjs/shares.js +0 -874
- package/dist-standalone/_deps/crypto/cjs/tlv.js +0 -1021
- package/dist-standalone/_deps/crypto/cjs/uuid.js +0 -443
- package/dist-standalone/_deps/crypto/cjs/verify.js +0 -414
- package/dist-standalone/_deps/crypto/cjs/xorida.js +0 -923
- package/dist-standalone/_deps/crypto/errors.d.ts +0 -51
- package/dist-standalone/_deps/crypto/errors.js +0 -199
- package/dist-standalone/_deps/crypto/hmac.d.ts +0 -39
- package/dist-standalone/_deps/crypto/hmac.js +0 -134
- package/dist-standalone/_deps/crypto/index.d.ts +0 -20
- package/dist-standalone/_deps/crypto/index.js +0 -145
- package/dist-standalone/_deps/crypto/padding.d.ts +0 -19
- package/dist-standalone/_deps/crypto/padding.js +0 -159
- package/dist-standalone/_deps/crypto/share-header.d.ts +0 -44
- package/dist-standalone/_deps/crypto/share-header.js +0 -92
- package/dist-standalone/_deps/crypto/shares.d.ts +0 -27
- package/dist-standalone/_deps/crypto/shares.js +0 -295
- package/dist-standalone/_deps/crypto/tlv.d.ts +0 -26
- package/dist-standalone/_deps/crypto/tlv.js +0 -364
- package/dist-standalone/_deps/crypto/uuid.d.ts +0 -22
- package/dist-standalone/_deps/crypto/uuid.js +0 -136
- package/dist-standalone/_deps/crypto/verify.d.ts +0 -15
- package/dist-standalone/_deps/crypto/verify.js +0 -71
- package/dist-standalone/_deps/crypto/xorida.d.ts +0 -44
- package/dist-standalone/_deps/crypto/xorida.js +0 -366
- package/dist-standalone/_deps/shared/errors.d.ts.map +0 -1
- package/dist-standalone/_deps/shared/errors.js.map +0 -1
- package/dist-standalone/_deps/shared/index.d.ts.map +0 -1
- package/dist-standalone/_deps/shared/index.js.map +0 -1
- package/dist-standalone/_deps/shared/types.d.ts.map +0 -1
- package/dist-standalone/_deps/shared/types.js.map +0 -1
- package/dist-standalone/_deps/ux-helpers/cjs/errors.d.ts.map +0 -1
- package/dist-standalone/_deps/ux-helpers/cjs/errors.js.map +0 -1
- package/dist-standalone/_deps/ux-helpers/cjs/index.d.ts.map +0 -1
- package/dist-standalone/_deps/ux-helpers/cjs/index.js.map +0 -1
- package/dist-standalone/_deps/ux-helpers/cjs/pagination.d.ts.map +0 -1
- package/dist-standalone/_deps/ux-helpers/cjs/pagination.js.map +0 -1
- package/dist-standalone/_deps/ux-helpers/cjs/progress.d.ts.map +0 -1
- package/dist-standalone/_deps/ux-helpers/cjs/progress.js.map +0 -1
- package/dist-standalone/_deps/ux-helpers/cjs/search.d.ts.map +0 -1
- package/dist-standalone/_deps/ux-helpers/cjs/search.js.map +0 -1
- package/dist-standalone/_deps/ux-helpers/cjs/types.d.ts.map +0 -1
- package/dist-standalone/_deps/ux-helpers/cjs/types.js.map +0 -1
- package/dist-standalone/_deps/ux-helpers/errors.d.ts.map +0 -1
- package/dist-standalone/_deps/ux-helpers/errors.js.map +0 -1
- package/dist-standalone/_deps/ux-helpers/index.d.ts.map +0 -1
- package/dist-standalone/_deps/ux-helpers/index.js.map +0 -1
- package/dist-standalone/_deps/ux-helpers/pagination.d.ts.map +0 -1
- package/dist-standalone/_deps/ux-helpers/pagination.js.map +0 -1
- package/dist-standalone/_deps/ux-helpers/progress.d.ts.map +0 -1
- package/dist-standalone/_deps/ux-helpers/progress.js.map +0 -1
- package/dist-standalone/_deps/ux-helpers/search.d.ts.map +0 -1
- package/dist-standalone/_deps/ux-helpers/search.js.map +0 -1
- package/dist-standalone/_deps/ux-helpers/types.d.ts.map +0 -1
- package/dist-standalone/_deps/ux-helpers/types.js.map +0 -1
- package/dist-standalone/_deps/xregistry/discovery.d.ts.map +0 -1
- package/dist-standalone/_deps/xregistry/discovery.js.map +0 -1
- package/dist-standalone/_deps/xregistry/errors.d.ts.map +0 -1
- package/dist-standalone/_deps/xregistry/errors.js.map +0 -1
- package/dist-standalone/_deps/xregistry/index.d.ts.map +0 -1
- package/dist-standalone/_deps/xregistry/index.js.map +0 -1
- package/dist-standalone/_deps/xregistry/registry.d.ts.map +0 -1
- package/dist-standalone/_deps/xregistry/registry.js.map +0 -1
- package/dist-standalone/_deps/xregistry/schema.d.ts.map +0 -1
- package/dist-standalone/_deps/xregistry/schema.js.map +0 -1
- package/dist-standalone/_deps/xregistry/types.d.ts.map +0 -1
- package/dist-standalone/_deps/xregistry/types.js.map +0 -1
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
(function (_0x5d198c, _0x2f5094) {
|
|
2
|
-
const a15_0x175362 = {
|
|
3
|
-
_0x5f4b84: 0x7d,
|
|
4
|
-
_0x183ea1: 0x91,
|
|
5
|
-
_0x5d2c40: 0x7e
|
|
6
|
-
}, _0x24c48d = a15_0x15c3, _0xc40c8f = _0x5d198c();
|
|
7
|
-
while (!![]) {
|
|
8
|
-
try {
|
|
9
|
-
const _0x43af0a = -parseInt(_0x24c48d(0x89)) / 0x1 * (-parseInt(_0x24c48d(0x8a)) / 0x2) + -parseInt(_0x24c48d(0x81)) / 0x3 + -parseInt(_0x24c48d(a15_0x175362._0x5f4b84)) / 0x4 * (-parseInt(_0x24c48d(a15_0x175362._0x183ea1)) / 0x5) + -parseInt(_0x24c48d(0x7f)) / 0x6 + parseInt(_0x24c48d(0x8d)) / 0x7 + parseInt(_0x24c48d(0x7a)) / 0x8 + -parseInt(_0x24c48d(a15_0x175362._0x5d2c40)) / 0x9;
|
|
10
|
-
if (_0x43af0a === _0x2f5094)
|
|
11
|
-
break;
|
|
12
|
-
else
|
|
13
|
-
_0xc40c8f['push'](_0xc40c8f['shift']());
|
|
14
|
-
} catch (_0x5f5997) {
|
|
15
|
-
_0xc40c8f['push'](_0xc40c8f['shift']());
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}(a15_0x1417, 0x55ba8));
|
|
19
|
-
function a15_0x1417() {
|
|
20
|
-
const _0x368909 = [
|
|
21
|
-
'BgvUz3rO',
|
|
22
|
-
'C2v0',
|
|
23
|
-
'C2XPy2u',
|
|
24
|
-
'yMvfzu0',
|
|
25
|
-
'AuDfD2e',
|
|
26
|
-
'sw5WDxqGBgvUz3rOigLZig5VDcbHig11BhrPCgXLig9MigjSB2nRihnPEMu',
|
|
27
|
-
'sw52ywXPzcbWywrKAw5NihzHBhvLoIa',
|
|
28
|
-
'mty0mJuXwffXsu1i',
|
|
29
|
-
'mLjHsKnNwa',
|
|
30
|
-
'EhLyELC',
|
|
31
|
-
'z2vjq0u',
|
|
32
|
-
'mZy1mZq0mgn4EgfgBW',
|
|
33
|
-
'EK51Axu',
|
|
34
|
-
'te1otw0',
|
|
35
|
-
'su5wquXjrf9qquresu5h',
|
|
36
|
-
'ntbrrenODwi',
|
|
37
|
-
'Auv4ree',
|
|
38
|
-
'Cu1MEKG',
|
|
39
|
-
'tgLJvM8',
|
|
40
|
-
'ndK4mdeYme5sExvQDa',
|
|
41
|
-
'ALbuquO',
|
|
42
|
-
'sw5WDxqGAxmGzw1WDhK',
|
|
43
|
-
'mZCZntzmuxvUwhK',
|
|
44
|
-
'mJmXnZKXnfPRveTcwG',
|
|
45
|
-
'mJK5nJeYngfSsKjmDq',
|
|
46
|
-
'Dw12EKG',
|
|
47
|
-
'odGYmdK2AxzouxDi'
|
|
48
|
-
];
|
|
49
|
-
a15_0x1417 = function () {
|
|
50
|
-
return _0x368909;
|
|
51
|
-
};
|
|
52
|
-
return a15_0x1417();
|
|
53
|
-
}
|
|
54
|
-
import {
|
|
55
|
-
ok,
|
|
56
|
-
err
|
|
57
|
-
} from"../shared/index.js";
|
|
58
|
-
function a15_0x15c3(_0xa3877a, _0xbfc628) {
|
|
59
|
-
_0xa3877a = _0xa3877a - 0x7a;
|
|
60
|
-
const _0x141737 = a15_0x1417();
|
|
61
|
-
let _0x15c315 = _0x141737[_0xa3877a];
|
|
62
|
-
if (a15_0x15c3['VTcsPq'] === undefined) {
|
|
63
|
-
var _0x4c0a07 = function (_0x44c586) {
|
|
64
|
-
const _0xcc6f72 = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';
|
|
65
|
-
let _0x157f68 = '', _0x4b3b8c = '';
|
|
66
|
-
for (let _0x37b322 = 0x0, _0xc1b253, _0x29c0b1, _0x363e53 = 0x0; _0x29c0b1 = _0x44c586['charAt'](_0x363e53++); ~_0x29c0b1 && (_0xc1b253 = _0x37b322 % 0x4 ? _0xc1b253 * 0x40 + _0x29c0b1 : _0x29c0b1, _0x37b322++ % 0x4) ? _0x157f68 += String['fromCharCode'](0xff & _0xc1b253 >> (-0x2 * _0x37b322 & 0x6)) : 0x0) {
|
|
67
|
-
_0x29c0b1 = _0xcc6f72['indexOf'](_0x29c0b1);
|
|
68
|
-
}
|
|
69
|
-
for (let _0x5bd8d6 = 0x0, _0x592bdd = _0x157f68['length']; _0x5bd8d6 < _0x592bdd; _0x5bd8d6++) {
|
|
70
|
-
_0x4b3b8c += '%' + ('00' + _0x157f68['charCodeAt'](_0x5bd8d6)['toString'](0x10))['slice'](-0x2);
|
|
71
|
-
}
|
|
72
|
-
return decodeURIComponent(_0x4b3b8c);
|
|
73
|
-
};
|
|
74
|
-
a15_0x15c3['ciBkJS'] = _0x4c0a07, a15_0x15c3['eLfSFH'] = {}, a15_0x15c3['VTcsPq'] = !![];
|
|
75
|
-
}
|
|
76
|
-
const _0x2916c8 = _0x141737[0x0], _0x5f2871 = _0xa3877a + _0x2916c8, _0x505439 = a15_0x15c3['eLfSFH'][_0x5f2871];
|
|
77
|
-
return !_0x505439 ? (_0x15c315 = a15_0x15c3['ciBkJS'](_0x15c315), a15_0x15c3['eLfSFH'][_0x5f2871] = _0x15c315) : _0x15c315 = _0x505439, _0x15c315;
|
|
78
|
-
}
|
|
79
|
-
export function pkcs7Pad(_0x2f1a7f, _0x7f175d) {
|
|
80
|
-
const a15_0x414826 = {
|
|
81
|
-
_0x229bc2: 0x85,
|
|
82
|
-
_0x16fd15: 0x82,
|
|
83
|
-
_0x331145: 0x83,
|
|
84
|
-
_0x3e5d95: 0x82
|
|
85
|
-
}, _0x322b3c = a15_0x15c3, _0x13cea8 = {
|
|
86
|
-
'beEeM': function (_0x1528e9, _0x1e7296) {
|
|
87
|
-
return _0x1528e9 - _0x1e7296;
|
|
88
|
-
},
|
|
89
|
-
'LMNMm': function (_0x281394, _0x574c31) {
|
|
90
|
-
return _0x281394 < _0x574c31;
|
|
91
|
-
}
|
|
92
|
-
}, _0x36dc11 = _0x13cea8[_0x322b3c(a15_0x414826._0x229bc2)](_0x7f175d, _0x2f1a7f[_0x322b3c(a15_0x414826._0x16fd15)] % _0x7f175d), _0x26444a = new Uint8Array(_0x2f1a7f[_0x322b3c(a15_0x414826._0x16fd15)] + _0x36dc11);
|
|
93
|
-
_0x26444a[_0x322b3c(a15_0x414826._0x331145)](_0x2f1a7f);
|
|
94
|
-
for (let _0x4b8c25 = _0x2f1a7f['length']; _0x13cea8[_0x322b3c(0x8f)](_0x4b8c25, _0x26444a[_0x322b3c(a15_0x414826._0x3e5d95)]); _0x4b8c25++) {
|
|
95
|
-
_0x26444a[_0x4b8c25] = _0x36dc11;
|
|
96
|
-
}
|
|
97
|
-
return _0x26444a;
|
|
98
|
-
}
|
|
99
|
-
export function pkcs7Unpad(_0x191816, _0xacaf17) {
|
|
100
|
-
const a15_0x4252ad = {
|
|
101
|
-
_0x42c045: 0x90,
|
|
102
|
-
_0x564a4f: 0x90,
|
|
103
|
-
_0x5afd8e: 0x7b,
|
|
104
|
-
_0x5e8aae: 0x82,
|
|
105
|
-
_0x2fc6f2: 0x8e,
|
|
106
|
-
_0x5828bb: 0x82,
|
|
107
|
-
_0x1ba374: 0x93,
|
|
108
|
-
_0x3fbf77: 0x94,
|
|
109
|
-
_0x559509: 0x92,
|
|
110
|
-
_0x5328cd: 0x8c
|
|
111
|
-
}, _0xdcb468 = a15_0x15c3, _0x49a489 = {
|
|
112
|
-
'qMfzH': function (_0x450f5b, _0x4e4740) {
|
|
113
|
-
return _0x450f5b(_0x4e4740);
|
|
114
|
-
},
|
|
115
|
-
'iGEwa': _0xdcb468(0x7c),
|
|
116
|
-
'jPTAJ': function (_0x1a1695, _0x473aa0) {
|
|
117
|
-
return _0x1a1695 % _0x473aa0;
|
|
118
|
-
},
|
|
119
|
-
'xyXzW': function (_0x2945d0, _0x2bd15c) {
|
|
120
|
-
return _0x2945d0(_0x2bd15c);
|
|
121
|
-
},
|
|
122
|
-
'ifCQN': _0xdcb468(a15_0x4252ad._0x42c045),
|
|
123
|
-
'zNuiu': _0xdcb468(0x87),
|
|
124
|
-
'umvzH': function (_0x3a2828, _0x55b409) {
|
|
125
|
-
return _0x3a2828 > _0x55b409;
|
|
126
|
-
},
|
|
127
|
-
'LicVo': function (_0x2c8f7b, _0x32c9e2) {
|
|
128
|
-
return _0x2c8f7b - _0x32c9e2;
|
|
129
|
-
},
|
|
130
|
-
'iExDA': function (_0x408959, _0x19eb68) {
|
|
131
|
-
return _0x408959 < _0x19eb68;
|
|
132
|
-
},
|
|
133
|
-
'geICE': 'Inconsistent\x20padding\x20bytes'
|
|
134
|
-
};
|
|
135
|
-
if (_0x191816[_0xdcb468(0x82)] === 0x0)
|
|
136
|
-
return _0x49a489[_0xdcb468(0x93)](err, {
|
|
137
|
-
'code': _0xdcb468(a15_0x4252ad._0x564a4f),
|
|
138
|
-
'message': _0x49a489[_0xdcb468(0x86)]
|
|
139
|
-
});
|
|
140
|
-
if (_0x49a489[_0xdcb468(a15_0x4252ad._0x5afd8e)](_0x191816[_0xdcb468(a15_0x4252ad._0x5e8aae)], _0xacaf17) !== 0x0)
|
|
141
|
-
return _0x49a489[_0xdcb468(0x8b)](err, {
|
|
142
|
-
'code': _0x49a489['ifCQN'],
|
|
143
|
-
'message': _0x49a489[_0xdcb468(a15_0x4252ad._0x2fc6f2)]
|
|
144
|
-
});
|
|
145
|
-
const _0x3bbbde = _0x191816[_0x191816[_0xdcb468(a15_0x4252ad._0x5828bb)] - 0x1];
|
|
146
|
-
if (_0x3bbbde === undefined || _0x3bbbde < 0x1 || _0x49a489[_0xdcb468(0x80)](_0x3bbbde, _0xacaf17))
|
|
147
|
-
return _0x49a489[_0xdcb468(a15_0x4252ad._0x1ba374)](err, {
|
|
148
|
-
'code': 'INVALID_PADDING',
|
|
149
|
-
'message': _0xdcb468(0x88) + _0x3bbbde
|
|
150
|
-
});
|
|
151
|
-
for (let _0x3e2ac7 = _0x49a489[_0xdcb468(a15_0x4252ad._0x3fbf77)](_0x191816['length'], _0x3bbbde); _0x49a489[_0xdcb468(a15_0x4252ad._0x559509)](_0x3e2ac7, _0x191816[_0xdcb468(0x82)]); _0x3e2ac7++) {
|
|
152
|
-
if (_0x191816[_0x3e2ac7] !== _0x3bbbde)
|
|
153
|
-
return err({
|
|
154
|
-
'code': _0xdcb468(0x90),
|
|
155
|
-
'message': _0x49a489[_0xdcb468(a15_0x4252ad._0x5328cd)]
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
return ok(_0x191816[_0xdcb468(0x84)](0x0, _0x191816[_0xdcb468(a15_0x4252ad._0x5828bb)] - _0x3bbbde));
|
|
159
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Branded share header — IDA5 copyright layer.
|
|
3
|
-
*
|
|
4
|
-
* Wraps every XorIDA share output with the patent-locked branded string:
|
|
5
|
-
*
|
|
6
|
-
* Xecret (TM) -> PRIVATE .ME (R) -> IDA5 -> Encrypted:// [data] => Generated by Xecret (TM)
|
|
7
|
-
*
|
|
8
|
-
* This provides triple legal protection on every share artifact:
|
|
9
|
-
* - Patent (20 years): XorIDA algorithm and split-channel architecture
|
|
10
|
-
* - Copyright (95 years): the literal branded header expression
|
|
11
|
-
* - Trademark (indefinite): Xecret(TM) and PRIVATE .ME(R) marks
|
|
12
|
-
*
|
|
13
|
-
* NEVER modify the header format. It is patent-locked.
|
|
14
|
-
*/
|
|
15
|
-
/**
|
|
16
|
-
* Wrap share data with the branded IDA5 copyright header.
|
|
17
|
-
*
|
|
18
|
-
* Output format (patent-locked, NEVER change):
|
|
19
|
-
* Xecret (TM) -> PRIVATE .ME (R) -> IDA5 -> Encrypted:// [data] => Generated by Xecret (TM)
|
|
20
|
-
*
|
|
21
|
-
* @param data - Base64-encoded share data (or any string payload)
|
|
22
|
-
* @returns Branded string with copyright header wrapping the data
|
|
23
|
-
*/
|
|
24
|
-
export declare function formatShareHeader(data: string): string;
|
|
25
|
-
/**
|
|
26
|
-
* Extract share data from a branded IDA5 header string.
|
|
27
|
-
*
|
|
28
|
-
* Backward-compatible: if the branded markers are not found, returns
|
|
29
|
-
* the input string trimmed (handles legacy headerless shares).
|
|
30
|
-
*
|
|
31
|
-
* @param input - Branded share string or legacy raw data
|
|
32
|
-
* @returns Extracted share data with whitespace trimmed
|
|
33
|
-
*/
|
|
34
|
-
export declare function parseShareHeader(input: string): string;
|
|
35
|
-
/**
|
|
36
|
-
* Check whether a string contains the branded IDA5 share header.
|
|
37
|
-
*
|
|
38
|
-
* Useful for format detection — distinguishing branded shares from
|
|
39
|
-
* legacy raw base64 shares.
|
|
40
|
-
*
|
|
41
|
-
* @param input - String to check
|
|
42
|
-
* @returns true if the branded markers are present
|
|
43
|
-
*/
|
|
44
|
-
export declare function hasShareHeader(input: string): boolean;
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
function a16_0x5139(_0x40c6da, _0x1409ab) {
|
|
2
|
-
_0x40c6da = _0x40c6da - 0x17e;
|
|
3
|
-
const _0x226aa3 = a16_0x226a();
|
|
4
|
-
let _0x51390c = _0x226aa3[_0x40c6da];
|
|
5
|
-
if (a16_0x5139['AmtZQJ'] === undefined) {
|
|
6
|
-
var _0x320e15 = function (_0x4de224) {
|
|
7
|
-
const _0x523752 = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';
|
|
8
|
-
let _0x340a16 = '', _0x1e436f = '';
|
|
9
|
-
for (let _0x25bf0c = 0x0, _0xee4988, _0x1d17fd, _0x170a4e = 0x0; _0x1d17fd = _0x4de224['charAt'](_0x170a4e++); ~_0x1d17fd && (_0xee4988 = _0x25bf0c % 0x4 ? _0xee4988 * 0x40 + _0x1d17fd : _0x1d17fd, _0x25bf0c++ % 0x4) ? _0x340a16 += String['fromCharCode'](0xff & _0xee4988 >> (-0x2 * _0x25bf0c & 0x6)) : 0x0) {
|
|
10
|
-
_0x1d17fd = _0x523752['indexOf'](_0x1d17fd);
|
|
11
|
-
}
|
|
12
|
-
for (let _0x4fe02e = 0x0, _0x5eb019 = _0x340a16['length']; _0x4fe02e < _0x5eb019; _0x4fe02e++) {
|
|
13
|
-
_0x1e436f += '%' + ('00' + _0x340a16['charCodeAt'](_0x4fe02e)['toString'](0x10))['slice'](-0x2);
|
|
14
|
-
}
|
|
15
|
-
return decodeURIComponent(_0x1e436f);
|
|
16
|
-
};
|
|
17
|
-
a16_0x5139['BbIyCj'] = _0x320e15, a16_0x5139['ImIViU'] = {}, a16_0x5139['AmtZQJ'] = !![];
|
|
18
|
-
}
|
|
19
|
-
const _0x20c427 = _0x226aa3[0x0], _0x2f8950 = _0x40c6da + _0x20c427, _0x4bd684 = a16_0x5139['ImIViU'][_0x2f8950];
|
|
20
|
-
return !_0x4bd684 ? (_0x51390c = a16_0x5139['BbIyCj'](_0x51390c), a16_0x5139['ImIViU'][_0x2f8950] = _0x51390c) : _0x51390c = _0x4bd684, _0x51390c;
|
|
21
|
-
}
|
|
22
|
-
function a16_0x226a() {
|
|
23
|
-
const _0x48f135 = [
|
|
24
|
-
'mtrcve5hrLq',
|
|
25
|
-
'DhjPBq',
|
|
26
|
-
'nhnwD3rVCG',
|
|
27
|
-
'mte2mdG3mePmAhfTzq',
|
|
28
|
-
'mJC5mJm3CwL0AfnZ',
|
|
29
|
-
'ota1otu4BKnHywfJ',
|
|
30
|
-
'mK12wgnqBq',
|
|
31
|
-
'Aw5JBhvKzxm',
|
|
32
|
-
'D3PdELe',
|
|
33
|
-
'pt4Gr2vUzxjHDgvKigj5ifHLy3jLDcaOve0P',
|
|
34
|
-
'nJq0mJyWmgrRs2HfDa',
|
|
35
|
-
'BgvUz3rO',
|
|
36
|
-
'Aw5KzxHpzG',
|
|
37
|
-
'nde3mdm2ruDdAeLX',
|
|
38
|
-
'mtG1nteXB1PNB0LL',
|
|
39
|
-
'mtG0ntKYCevOquzg'
|
|
40
|
-
];
|
|
41
|
-
a16_0x226a = function () {
|
|
42
|
-
return _0x48f135;
|
|
43
|
-
};
|
|
44
|
-
return a16_0x226a();
|
|
45
|
-
}
|
|
46
|
-
const a16_0x491c11 = a16_0x5139;
|
|
47
|
-
(function (_0x415a98, _0x4d924d) {
|
|
48
|
-
const a16_0x1ac394 = {
|
|
49
|
-
_0x624c38: 0x17f,
|
|
50
|
-
_0x1e2ab3: 0x184,
|
|
51
|
-
_0x4cbf43: 0x17e,
|
|
52
|
-
_0x215cc9: 0x181,
|
|
53
|
-
_0x21d3e0: 0x18b
|
|
54
|
-
}, _0x417f34 = a16_0x5139, _0x415a7c = _0x415a98();
|
|
55
|
-
while (!![]) {
|
|
56
|
-
try {
|
|
57
|
-
const _0x3e67c7 = parseInt(_0x417f34(a16_0x1ac394._0x624c38)) / 0x1 * (-parseInt(_0x417f34(0x187)) / 0x2) + parseInt(_0x417f34(0x185)) / 0x3 * (-parseInt(_0x417f34(0x183)) / 0x4) + -parseInt(_0x417f34(a16_0x1ac394._0x1e2ab3)) / 0x5 + -parseInt(_0x417f34(a16_0x1ac394._0x4cbf43)) / 0x6 * (parseInt(_0x417f34(a16_0x1ac394._0x215cc9)) / 0x7) + parseInt(_0x417f34(0x180)) / 0x8 + parseInt(_0x417f34(0x186)) / 0x9 + parseInt(_0x417f34(a16_0x1ac394._0x21d3e0)) / 0xa;
|
|
58
|
-
if (_0x3e67c7 === _0x4d924d)
|
|
59
|
-
break;
|
|
60
|
-
else
|
|
61
|
-
_0x415a7c['push'](_0x415a7c['shift']());
|
|
62
|
-
} catch (_0x2f1571) {
|
|
63
|
-
_0x415a7c['push'](_0x415a7c['shift']());
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}(a16_0x226a, 0x1cdcc));
|
|
67
|
-
const START_MARKER = 'Encrypted://', END_MARKER = a16_0x491c11(0x18a), BRAND_PREFIX = 'Xecret\x20(TM)\x20->\x20PRIVATE\x20.ME\x20(R)\x20->\x20IDA5\x20->\x20';
|
|
68
|
-
export function formatShareHeader(_0x251ca8) {
|
|
69
|
-
return '' + BRAND_PREFIX + START_MARKER + '\x20' + _0x251ca8 + '\x20' + END_MARKER;
|
|
70
|
-
}
|
|
71
|
-
export function parseShareHeader(_0x570a4c) {
|
|
72
|
-
const a16_0x1cdbcd = {
|
|
73
|
-
_0x4b26e4: 0x189,
|
|
74
|
-
_0x23c6bf: 0x182,
|
|
75
|
-
_0x3be96e: 0x18c,
|
|
76
|
-
_0x567417: 0x182
|
|
77
|
-
}, _0x2cb62f = a16_0x5139, _0x1fba96 = {
|
|
78
|
-
'wzCzQ': function (_0xd22881, _0x55765f) {
|
|
79
|
-
return _0xd22881 < _0x55765f;
|
|
80
|
-
}
|
|
81
|
-
}, _0x39890d = _0x570a4c[_0x2cb62f(0x18d)](START_MARKER);
|
|
82
|
-
if (_0x1fba96[_0x2cb62f(a16_0x1cdbcd._0x4b26e4)](_0x39890d, 0x0))
|
|
83
|
-
return _0x570a4c[_0x2cb62f(a16_0x1cdbcd._0x23c6bf)]();
|
|
84
|
-
const _0x3b125f = _0x39890d + START_MARKER[_0x2cb62f(a16_0x1cdbcd._0x3be96e)], _0x559323 = _0x570a4c[_0x2cb62f(0x18d)](END_MARKER, _0x3b125f);
|
|
85
|
-
if (_0x1fba96[_0x2cb62f(0x189)](_0x559323, 0x0))
|
|
86
|
-
return _0x570a4c[_0x2cb62f(a16_0x1cdbcd._0x567417)]();
|
|
87
|
-
return _0x570a4c['substring'](_0x3b125f, _0x559323)['trim']();
|
|
88
|
-
}
|
|
89
|
-
export function hasShareHeader(_0x5bae93) {
|
|
90
|
-
const a16_0x1d5ec8 = { _0x433000: 0x188 }, _0x5ce5c = a16_0x5139;
|
|
91
|
-
return _0x5bae93[_0x5ce5c(a16_0x1d5ec8._0x433000)](START_MARKER) && _0x5bae93['includes'](END_MARKER);
|
|
92
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* High-level share creation and reconstruction API.
|
|
3
|
-
*
|
|
4
|
-
* Sender pipeline: serialize (TLV) → pad (PKCS#7) → HMAC (sign) → split (XorIDA)
|
|
5
|
-
* Receiver pipeline: reconstruct (XorIDA) → verify (HMAC) → unpad (PKCS#7) → deserialize (TLV)
|
|
6
|
-
*/
|
|
7
|
-
import type { Result, XailMessage, XailShare, ReconstructionError } from '@private.me/shared';
|
|
8
|
-
/**
|
|
9
|
-
* Create shares from a XailMessage.
|
|
10
|
-
*
|
|
11
|
-
* Pipeline: serialize → pad → HMAC → split → package as XailShare[]
|
|
12
|
-
*
|
|
13
|
-
* @param message - The message to split into shares
|
|
14
|
-
* @param n - Total number of shares to produce
|
|
15
|
-
* @param k - Threshold: minimum shares needed for reconstruction
|
|
16
|
-
* @returns Array of n XailShare objects ready for transport
|
|
17
|
-
*/
|
|
18
|
-
export declare function createShares(message: XailMessage, n: number, k: number): Promise<XailShare[]>;
|
|
19
|
-
/**
|
|
20
|
-
* Reconstruct a XailMessage from k shares.
|
|
21
|
-
*
|
|
22
|
-
* Pipeline: validate → reconstruct → verify HMAC → unpad → deserialize
|
|
23
|
-
*
|
|
24
|
-
* @param shares - Array of k XailShare objects (must share the same UUID)
|
|
25
|
-
* @returns Reconstructed message, or ReconstructionError
|
|
26
|
-
*/
|
|
27
|
-
export declare function reconstructMessage(shares: readonly XailShare[]): Promise<Result<XailMessage, ReconstructionError>>;
|
|
@@ -1,295 +0,0 @@
|
|
|
1
|
-
(function (_0x54f50e, _0x47046d) {
|
|
2
|
-
const a17_0x14eb00 = {
|
|
3
|
-
_0x45a251: 0x6b,
|
|
4
|
-
_0x2b2a91: 0x76,
|
|
5
|
-
_0xac70e1: 0x91,
|
|
6
|
-
_0x5b77ad: 0x7b,
|
|
7
|
-
_0x228a8a: 0x8d,
|
|
8
|
-
_0x291c61: 0x96
|
|
9
|
-
}, _0x2be85f = a17_0x39d7, _0x5926bb = _0x54f50e();
|
|
10
|
-
while (!![]) {
|
|
11
|
-
try {
|
|
12
|
-
const _0x48cd75 = parseInt(_0x2be85f(0x72)) / 0x1 * (parseInt(_0x2be85f(a17_0x14eb00._0x45a251)) / 0x2) + -parseInt(_0x2be85f(a17_0x14eb00._0x2b2a91)) / 0x3 * (-parseInt(_0x2be85f(a17_0x14eb00._0xac70e1)) / 0x4) + parseInt(_0x2be85f(0x7a)) / 0x5 + -parseInt(_0x2be85f(0x8f)) / 0x6 + -parseInt(_0x2be85f(a17_0x14eb00._0x5b77ad)) / 0x7 + parseInt(_0x2be85f(a17_0x14eb00._0x228a8a)) / 0x8 * (-parseInt(_0x2be85f(0x93)) / 0x9) + parseInt(_0x2be85f(a17_0x14eb00._0x291c61)) / 0xa;
|
|
13
|
-
if (_0x48cd75 === _0x47046d)
|
|
14
|
-
break;
|
|
15
|
-
else
|
|
16
|
-
_0x5926bb['push'](_0x5926bb['shift']());
|
|
17
|
-
} catch (_0x2f9244) {
|
|
18
|
-
_0x5926bb['push'](_0x5926bb['shift']());
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}(a17_0x5768, 0x2ae90));
|
|
22
|
-
import {
|
|
23
|
-
ok,
|
|
24
|
-
err
|
|
25
|
-
} from"../shared/index.js";
|
|
26
|
-
function a17_0x39d7(_0x4e448e, _0x1c8fc7) {
|
|
27
|
-
_0x4e448e = _0x4e448e - 0x65;
|
|
28
|
-
const _0x5768a2 = a17_0x5768();
|
|
29
|
-
let _0x39d7ef = _0x5768a2[_0x4e448e];
|
|
30
|
-
if (a17_0x39d7['qneHFf'] === undefined) {
|
|
31
|
-
var _0x49dcab = function (_0x300447) {
|
|
32
|
-
const _0x14bf49 = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';
|
|
33
|
-
let _0x3308ce = '', _0x359ee8 = '';
|
|
34
|
-
for (let _0xc6d664 = 0x0, _0x1eca43, _0x143197, _0x42dba4 = 0x0; _0x143197 = _0x300447['charAt'](_0x42dba4++); ~_0x143197 && (_0x1eca43 = _0xc6d664 % 0x4 ? _0x1eca43 * 0x40 + _0x143197 : _0x143197, _0xc6d664++ % 0x4) ? _0x3308ce += String['fromCharCode'](0xff & _0x1eca43 >> (-0x2 * _0xc6d664 & 0x6)) : 0x0) {
|
|
35
|
-
_0x143197 = _0x14bf49['indexOf'](_0x143197);
|
|
36
|
-
}
|
|
37
|
-
for (let _0x354340 = 0x0, _0x438e7e = _0x3308ce['length']; _0x354340 < _0x438e7e; _0x354340++) {
|
|
38
|
-
_0x359ee8 += '%' + ('00' + _0x3308ce['charCodeAt'](_0x354340)['toString'](0x10))['slice'](-0x2);
|
|
39
|
-
}
|
|
40
|
-
return decodeURIComponent(_0x359ee8);
|
|
41
|
-
};
|
|
42
|
-
a17_0x39d7['VKDRWr'] = _0x49dcab, a17_0x39d7['IryBnf'] = {}, a17_0x39d7['qneHFf'] = !![];
|
|
43
|
-
}
|
|
44
|
-
const _0xf34aa8 = _0x5768a2[0x0], _0x1868b4 = _0x4e448e + _0xf34aa8, _0xa1bbf = a17_0x39d7['IryBnf'][_0x1868b4];
|
|
45
|
-
return !_0xa1bbf ? (_0x39d7ef = a17_0x39d7['VKDRWr'](_0x39d7ef), a17_0x39d7['IryBnf'][_0x1868b4] = _0x39d7ef) : _0x39d7ef = _0xa1bbf, _0x39d7ef;
|
|
46
|
-
}
|
|
47
|
-
function a17_0x5768() {
|
|
48
|
-
const _0x51e45b = [
|
|
49
|
-
'BgvUz3rO',
|
|
50
|
-
'qK5NyKy',
|
|
51
|
-
'Dg1Ss0G',
|
|
52
|
-
'zgf0yq',
|
|
53
|
-
'se1bq19gquLmvvjf',
|
|
54
|
-
'mZqXndjkqNb6s1q',
|
|
55
|
-
'qxL4uee',
|
|
56
|
-
'rLDfD1u',
|
|
57
|
-
'rgvZzxjPywXPEMf0Aw9UigzHAwXLzdOG',
|
|
58
|
-
'rxnIsMy',
|
|
59
|
-
'ig91DcbVzIbYyw5NzsbBmcWG',
|
|
60
|
-
'Dg9mB3DLCKnHC2u',
|
|
61
|
-
'mtfNBwDhtNO',
|
|
62
|
-
'Aw5KzxG',
|
|
63
|
-
'B1LHuvK',
|
|
64
|
-
'ihnOyxjLCYWGz290ia',
|
|
65
|
-
'm3PLCNvbCa',
|
|
66
|
-
'DgHYzxnOB2XK',
|
|
67
|
-
'B1bXtuW',
|
|
68
|
-
'C2XPy2u',
|
|
69
|
-
'nZG4odmWDhjgB0ry',
|
|
70
|
-
'mtu4nZi2nfjPDgPWvG',
|
|
71
|
-
'BwvZC2fNzq',
|
|
72
|
-
'AgfZ',
|
|
73
|
-
'vvvjrf9nsvnnqvrdsa',
|
|
74
|
-
'Ag1Hy0TLEq',
|
|
75
|
-
'DMfSDwu',
|
|
76
|
-
'DNDcuhi',
|
|
77
|
-
'su5tvuzgsunjru5ux1niqvjfuW',
|
|
78
|
-
'u2HHCMuGAw5KzxGG',
|
|
79
|
-
'uhHYyK0',
|
|
80
|
-
'DhjPBq',
|
|
81
|
-
'tMvLzca',
|
|
82
|
-
'rhvWBgLJyxrLihnOyxjLigLUzgv4ia',
|
|
83
|
-
'ywrK',
|
|
84
|
-
'v1PyquW',
|
|
85
|
-
'qwXJu2C',
|
|
86
|
-
'Cw5gufy',
|
|
87
|
-
'sgTJCLK',
|
|
88
|
-
'mtyWq1vtyKD2',
|
|
89
|
-
'DxvPza',
|
|
90
|
-
'mte3mte1og1mAfbesa',
|
|
91
|
-
'tM8GC2HHCMvZihbYB3zPzgvK',
|
|
92
|
-
'mte2mtCWnerywe9hBW',
|
|
93
|
-
'zevoC2S',
|
|
94
|
-
'oda3otnxyvvnwNC',
|
|
95
|
-
'ENrVuvy',
|
|
96
|
-
'rLbRufO',
|
|
97
|
-
'mtqXmJCYmgLmAKHxvq',
|
|
98
|
-
'zxjYB3i',
|
|
99
|
-
'su5wquXjrf9jtKrfwa',
|
|
100
|
-
'Dg90ywXtAgfYzxm',
|
|
101
|
-
'u2HHCMvZigHHDMuGAw5JB25ZAxn0zw50ig4VAYb2ywX1zxm',
|
|
102
|
-
'su5wquXjrf9tsefsrvm'
|
|
103
|
-
];
|
|
104
|
-
a17_0x5768 = function () {
|
|
105
|
-
return _0x51e45b;
|
|
106
|
-
};
|
|
107
|
-
return a17_0x5768();
|
|
108
|
-
}
|
|
109
|
-
import {
|
|
110
|
-
serializeMessage,
|
|
111
|
-
deserializeMessage
|
|
112
|
-
} from './tlv.js';
|
|
113
|
-
import {
|
|
114
|
-
pkcs7Pad,
|
|
115
|
-
pkcs7Unpad
|
|
116
|
-
} from './padding.js';
|
|
117
|
-
import {
|
|
118
|
-
generateHMAC,
|
|
119
|
-
verifyHMAC
|
|
120
|
-
} from './hmac.js';
|
|
121
|
-
import {
|
|
122
|
-
splitXorIDA,
|
|
123
|
-
reconstructXorIDA,
|
|
124
|
-
nextOddPrime
|
|
125
|
-
} from './xorida.js';
|
|
126
|
-
import { generateUUID } from './uuid.js';
|
|
127
|
-
export async function createShares(_0x12f083, _0x2aa019, _0x16003c) {
|
|
128
|
-
const a17_0x336b5f = {
|
|
129
|
-
_0x35a8c1: 0x8e,
|
|
130
|
-
_0x5c8da3: 0x8a
|
|
131
|
-
}, _0x16af96 = a17_0x39d7, _0x341560 = {
|
|
132
|
-
'dENsk': function (_0x9cb74) {
|
|
133
|
-
return _0x9cb74();
|
|
134
|
-
},
|
|
135
|
-
'AlcSg': function (_0x460755, _0x247125) {
|
|
136
|
-
return _0x460755 !== _0x247125;
|
|
137
|
-
},
|
|
138
|
-
'VJYBA': function (_0xc5e449, _0x2792e7) {
|
|
139
|
-
return _0xc5e449 - _0x2792e7;
|
|
140
|
-
}
|
|
141
|
-
}, _0x1dd90b = _0x12f083[_0x16af96(a17_0x336b5f._0x35a8c1)] || _0x341560[_0x16af96(0x92)](generateUUID), _0x328987 = _0x341560[_0x16af96(a17_0x336b5f._0x5c8da3)](_0x1dd90b, _0x12f083[_0x16af96(0x8e)]) ? {
|
|
142
|
-
..._0x12f083,
|
|
143
|
-
'uuid': _0x1dd90b
|
|
144
|
-
} : _0x12f083, _0x167138 = serializeMessage(_0x328987), _0x44d756 = nextOddPrime(_0x2aa019), _0x3d07f1 = _0x341560['VJYBA'](_0x44d756, 0x1), _0x16417c = pkcs7Pad(_0x167138, _0x3d07f1), {
|
|
145
|
-
key: _0x51425b,
|
|
146
|
-
signature: _0x3d16e8
|
|
147
|
-
} = await generateHMAC(_0x16417c), _0x3ada4e = splitXorIDA(_0x16417c, _0x2aa019, _0x16003c), _0x5de678 = _0x3ada4e['map']((_0x23d7ab, _0x2e3b15) => ({
|
|
148
|
-
'uuid': _0x1dd90b,
|
|
149
|
-
'index': _0x2e3b15,
|
|
150
|
-
'totalShares': _0x2aa019,
|
|
151
|
-
'threshold': _0x16003c,
|
|
152
|
-
'data': _0x23d7ab,
|
|
153
|
-
'hmacKey': _0x51425b['slice'](),
|
|
154
|
-
'hmacSignature': _0x3d16e8[_0x16af96(0x79)]()
|
|
155
|
-
}));
|
|
156
|
-
return _0x5de678;
|
|
157
|
-
}
|
|
158
|
-
export async function reconstructMessage(_0x50700b) {
|
|
159
|
-
const a17_0x307403 = {
|
|
160
|
-
_0x227fa2: 0x82,
|
|
161
|
-
_0x53a92f: 0x90,
|
|
162
|
-
_0x48dd5b: 0x81,
|
|
163
|
-
_0x5655f0: 0x89,
|
|
164
|
-
_0x72ed61: 0x77,
|
|
165
|
-
_0x42d942: 0x86,
|
|
166
|
-
_0x3ca728: 0x66,
|
|
167
|
-
_0x19b9cb: 0x6c,
|
|
168
|
-
_0x436e85: 0x99,
|
|
169
|
-
_0x5da107: 0x8b,
|
|
170
|
-
_0xe8fd36: 0x94,
|
|
171
|
-
_0x4e1518: 0x73,
|
|
172
|
-
_0x39343e: 0x74,
|
|
173
|
-
_0x4d2c8e: 0x83,
|
|
174
|
-
_0x42088e: 0x7d,
|
|
175
|
-
_0xc61bdc: 0x87,
|
|
176
|
-
_0x3ba152: 0x73,
|
|
177
|
-
_0xb7c748: 0x8c,
|
|
178
|
-
_0x22cdd6: 0x7f,
|
|
179
|
-
_0x438bb8: 0x67,
|
|
180
|
-
_0x14fa95: 0x6d,
|
|
181
|
-
_0x541ca9: 0x97,
|
|
182
|
-
_0x115255: 0x84,
|
|
183
|
-
_0x2d7bcb: 0x6e,
|
|
184
|
-
_0x42c26c: 0x7c,
|
|
185
|
-
_0x13db04: 0x80,
|
|
186
|
-
_0x1430ea: 0x8e,
|
|
187
|
-
_0x5e493d: 0x85,
|
|
188
|
-
_0x18a6a3: 0x95,
|
|
189
|
-
_0x36f426: 0x80,
|
|
190
|
-
_0x2a98c5: 0x8e
|
|
191
|
-
}, _0x304ca6 = a17_0x39d7, _0x1ca59f = {
|
|
192
|
-
'pngKV': function (_0x40fd03, _0x350e4b) {
|
|
193
|
-
return _0x40fd03 === _0x350e4b;
|
|
194
|
-
},
|
|
195
|
-
'vwBPr': function (_0xffccb1, _0x5e5f8a) {
|
|
196
|
-
return _0xffccb1(_0x5e5f8a);
|
|
197
|
-
},
|
|
198
|
-
'WZXAL': _0x304ca6(a17_0x307403._0x227fa2),
|
|
199
|
-
'DOcWp': _0x304ca6(a17_0x307403._0x53a92f),
|
|
200
|
-
'EsbJf': function (_0x55d4b8, _0x1a5cc0) {
|
|
201
|
-
return _0x55d4b8(_0x1a5cc0);
|
|
202
|
-
},
|
|
203
|
-
'AyxPA': function (_0x2ca239, _0x5701df) {
|
|
204
|
-
return _0x2ca239 !== _0x5701df;
|
|
205
|
-
},
|
|
206
|
-
'qnFPV': function (_0x2211ec, _0x311599) {
|
|
207
|
-
return _0x2211ec(_0x311599);
|
|
208
|
-
},
|
|
209
|
-
'tmlKH': 'Shares\x20have\x20different\x20UUIDs',
|
|
210
|
-
'ztoQV': _0x304ca6(0x65),
|
|
211
|
-
'oYaQY': function (_0x295f15, _0x131f63) {
|
|
212
|
-
return _0x295f15(_0x131f63);
|
|
213
|
-
},
|
|
214
|
-
'mQWqQ': 'INVALID_INDEX',
|
|
215
|
-
'HkcrY': function (_0xbb16dc, _0x54b9c0, _0x1d9934, _0xa609a8, _0xbb1982) {
|
|
216
|
-
return _0xbb16dc(_0x54b9c0, _0x1d9934, _0xa609a8, _0xbb1982);
|
|
217
|
-
},
|
|
218
|
-
'LooGs': function (_0x3fbb78, _0x116cbe, _0x2f3511, _0x5bb9b1) {
|
|
219
|
-
return _0x3fbb78(_0x116cbe, _0x2f3511, _0x5bb9b1);
|
|
220
|
-
},
|
|
221
|
-
'BNgbF': _0x304ca6(0x6a),
|
|
222
|
-
'FWEwU': 'HMAC\x20verification\x20failed\x20—\x20data\x20may\x20be\x20corrupted\x20or\x20tampered',
|
|
223
|
-
'PxrbM': function (_0x9a4067, _0x3cb2b0) {
|
|
224
|
-
return _0x9a4067(_0x3cb2b0);
|
|
225
|
-
},
|
|
226
|
-
'oPqML': function (_0x4123d0, _0x43c673) {
|
|
227
|
-
return _0x4123d0 !== _0x43c673;
|
|
228
|
-
},
|
|
229
|
-
'FPkPZ': _0x304ca6(0x7e),
|
|
230
|
-
'ltVLV': 'TLV\x20UUID\x20does\x20not\x20match\x20envelope\x20UUID'
|
|
231
|
-
};
|
|
232
|
-
if (_0x1ca59f['pngKV'](_0x50700b['length'], 0x0))
|
|
233
|
-
return _0x1ca59f[_0x304ca6(a17_0x307403._0x48dd5b)](err, {
|
|
234
|
-
'code': _0x1ca59f[_0x304ca6(a17_0x307403._0x5655f0)],
|
|
235
|
-
'message': _0x1ca59f['DOcWp']
|
|
236
|
-
});
|
|
237
|
-
const _0x50731d = _0x50700b[0x0], _0x31ef9c = _0x50731d[_0x304ca6(a17_0x307403._0x72ed61)], _0x22b30b = _0x50731d[_0x304ca6(0x99)];
|
|
238
|
-
if (_0x50700b[_0x304ca6(0x66)] < _0x31ef9c)
|
|
239
|
-
return _0x1ca59f[_0x304ca6(0x6f)](err, {
|
|
240
|
-
'code': _0x1ca59f['WZXAL'],
|
|
241
|
-
'message': _0x304ca6(a17_0x307403._0x42d942) + _0x31ef9c + _0x304ca6(0x75) + _0x50700b[_0x304ca6(a17_0x307403._0x3ca728)]
|
|
242
|
-
});
|
|
243
|
-
const _0x5265d9 = [], _0x11c353 = new Set();
|
|
244
|
-
for (const _0xd4d496 of _0x50700b) {
|
|
245
|
-
if (_0x1ca59f[_0x304ca6(a17_0x307403._0x19b9cb)](_0xd4d496['uuid'], _0x50731d[_0x304ca6(0x8e)]))
|
|
246
|
-
return _0x1ca59f[_0x304ca6(0x8b)](err, {
|
|
247
|
-
'code': _0x304ca6(0x65),
|
|
248
|
-
'message': _0x1ca59f[_0x304ca6(0x68)]
|
|
249
|
-
});
|
|
250
|
-
if (_0xd4d496[_0x304ca6(a17_0x307403._0x436e85)] !== _0x22b30b || _0xd4d496['threshold'] !== _0x31ef9c)
|
|
251
|
-
return _0x1ca59f[_0x304ca6(a17_0x307403._0x5da107)](err, {
|
|
252
|
-
'code': _0x1ca59f[_0x304ca6(a17_0x307403._0xe8fd36)],
|
|
253
|
-
'message': _0x304ca6(0x9a)
|
|
254
|
-
});
|
|
255
|
-
if (_0xd4d496[_0x304ca6(a17_0x307403._0x4e1518)] < 0x0 || _0xd4d496['index'] >= _0x22b30b)
|
|
256
|
-
return _0x1ca59f[_0x304ca6(a17_0x307403._0x39343e)](err, {
|
|
257
|
-
'code': _0x1ca59f['mQWqQ'],
|
|
258
|
-
'message': _0x304ca6(a17_0x307403._0x4d2c8e) + _0xd4d496[_0x304ca6(0x73)] + _0x304ca6(0x70) + _0x22b30b + ')'
|
|
259
|
-
});
|
|
260
|
-
if (_0x11c353[_0x304ca6(a17_0x307403._0x42088e)](_0xd4d496['index']))
|
|
261
|
-
return err({
|
|
262
|
-
'code': _0x304ca6(0x98),
|
|
263
|
-
'message': _0x304ca6(a17_0x307403._0xc61bdc) + _0xd4d496[_0x304ca6(0x73)]
|
|
264
|
-
});
|
|
265
|
-
_0x11c353[_0x304ca6(0x88)](_0xd4d496[_0x304ca6(a17_0x307403._0x3ba152)]), _0x5265d9['push'](_0xd4d496[_0x304ca6(0x73)]);
|
|
266
|
-
}
|
|
267
|
-
const _0xa43798 = _0x50700b['slice'](0x0, _0x31ef9c), _0x481908 = _0x5265d9['slice'](0x0, _0x31ef9c), _0x365b2a = _0xa43798['map'](_0x32b357 => _0x32b357[_0x304ca6(0x69)]), _0x30f118 = _0x1ca59f[_0x304ca6(a17_0x307403._0xb7c748)](reconstructXorIDA, _0x365b2a, _0x481908, _0x22b30b, _0x31ef9c), _0x3355de = await _0x1ca59f['LooGs'](verifyHMAC, _0x50731d[_0x304ca6(a17_0x307403._0x22cdd6)], _0x30f118, _0x50731d['hmacSignature']);
|
|
268
|
-
if (!_0x3355de)
|
|
269
|
-
return err({
|
|
270
|
-
'code': _0x1ca59f[_0x304ca6(a17_0x307403._0x438bb8)],
|
|
271
|
-
'message': _0x1ca59f[_0x304ca6(a17_0x307403._0x14fa95)]
|
|
272
|
-
});
|
|
273
|
-
const _0x5abd70 = nextOddPrime(_0x22b30b), _0x3889ee = _0x5abd70 - 0x1, _0xde0ec0 = pkcs7Unpad(_0x30f118, _0x3889ee);
|
|
274
|
-
if (!_0xde0ec0['ok'])
|
|
275
|
-
return _0x1ca59f[_0x304ca6(a17_0x307403._0x39343e)](err, {
|
|
276
|
-
'code': _0x1ca59f['BNgbF'],
|
|
277
|
-
'message': 'Unpadding\x20failed:\x20' + _0xde0ec0[_0x304ca6(a17_0x307403._0x541ca9)]['message']
|
|
278
|
-
});
|
|
279
|
-
const _0x226190 = _0x1ca59f[_0x304ca6(a17_0x307403._0x115255)](deserializeMessage, _0xde0ec0['value']);
|
|
280
|
-
if (!_0x226190['ok'])
|
|
281
|
-
return err({
|
|
282
|
-
'code': _0x1ca59f[_0x304ca6(0x94)],
|
|
283
|
-
'message': _0x304ca6(a17_0x307403._0x2d7bcb) + _0x226190['error'][_0x304ca6(a17_0x307403._0x42c26c)]
|
|
284
|
-
});
|
|
285
|
-
const _0x11b980 = _0x226190[_0x304ca6(a17_0x307403._0x13db04)][_0x304ca6(a17_0x307403._0x1430ea)];
|
|
286
|
-
if (_0x11b980 && _0x1ca59f[_0x304ca6(0x78)](_0x11b980[_0x304ca6(0x71)]()[_0x304ca6(a17_0x307403._0x5e493d)](), _0x50731d['uuid'][_0x304ca6(0x71)]()[_0x304ca6(0x85)]()))
|
|
287
|
-
return _0x1ca59f['PxrbM'](err, {
|
|
288
|
-
'code': _0x1ca59f[_0x304ca6(a17_0x307403._0x18a6a3)],
|
|
289
|
-
'message': _0x1ca59f['ltVLV']
|
|
290
|
-
});
|
|
291
|
-
return _0x1ca59f[_0x304ca6(0x6f)](ok, {
|
|
292
|
-
..._0x226190[_0x304ca6(a17_0x307403._0x36f426)],
|
|
293
|
-
'uuid': _0x50731d[_0x304ca6(a17_0x307403._0x2a98c5)]
|
|
294
|
-
});
|
|
295
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TLV (Type-Length-Value) serialization for Xail messages.
|
|
3
|
-
*
|
|
4
|
-
* Format: [Type: 1 byte][Length: 4 bytes uint32 BE][Value: Length bytes]
|
|
5
|
-
*
|
|
6
|
-
* Serialization order: MESSAGE_UUID, SENDER_ID, TIMESTAMP, CONTENT_TYPE,
|
|
7
|
-
* MESSAGE_BODY, ATTACHMENT(s).
|
|
8
|
-
*
|
|
9
|
-
* HMAC key/signature and per-share metadata are NOT in the TLV payload —
|
|
10
|
-
* they travel in the share envelope.
|
|
11
|
-
*/
|
|
12
|
-
import type { Result, SerializationError, XailMessage } from '@private.me/shared';
|
|
13
|
-
/**
|
|
14
|
-
* Serialize a XailMessage into a TLV byte stream.
|
|
15
|
-
*
|
|
16
|
-
* @param message - Message to serialize
|
|
17
|
-
* @returns TLV-encoded byte array
|
|
18
|
-
*/
|
|
19
|
-
export declare function serializeMessage(message: XailMessage): Uint8Array;
|
|
20
|
-
/**
|
|
21
|
-
* Deserialize a TLV byte stream into a XailMessage.
|
|
22
|
-
*
|
|
23
|
-
* @param data - TLV-encoded byte array
|
|
24
|
-
* @returns Deserialized message, or SerializationError if invalid
|
|
25
|
-
*/
|
|
26
|
-
export declare function deserializeMessage(data: Uint8Array): Result<XailMessage, SerializationError>;
|