@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,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module errors
|
|
3
|
-
* Named error class hierarchy for @private.me/crypto.
|
|
4
|
-
*
|
|
5
|
-
* Provides structured error types for XorIDA threshold sharing,
|
|
6
|
-
* HMAC integrity verification, PKCS#7 padding, and TLV serialization.
|
|
7
|
-
*/
|
|
8
|
-
/** Base error class for all crypto operations. */
|
|
9
|
-
export declare class CryptoError extends Error {
|
|
10
|
-
readonly code: string;
|
|
11
|
-
readonly subCode?: string;
|
|
12
|
-
readonly docUrl?: string;
|
|
13
|
-
constructor(code: string, message: string, docUrl?: string);
|
|
14
|
-
}
|
|
15
|
-
/** Error thrown during XorIDA split or reconstruction operations. */
|
|
16
|
-
export declare class CryptoSplitError extends CryptoError {
|
|
17
|
-
constructor(code: string, message: string);
|
|
18
|
-
}
|
|
19
|
-
/** Error thrown when HMAC integrity verification fails. */
|
|
20
|
-
export declare class CryptoIntegrityError extends CryptoError {
|
|
21
|
-
constructor(code: string, message: string);
|
|
22
|
-
}
|
|
23
|
-
/** Error thrown for PKCS#7 padding issues. */
|
|
24
|
-
export declare class CryptoPaddingError extends CryptoError {
|
|
25
|
-
constructor(code: string, message: string);
|
|
26
|
-
}
|
|
27
|
-
/** Error thrown during TLV serialization or deserialization. */
|
|
28
|
-
export declare class CryptoSerializationError extends CryptoError {
|
|
29
|
-
constructor(code: string, message: string);
|
|
30
|
-
}
|
|
31
|
-
/** Human-readable messages for each error code. */
|
|
32
|
-
export declare const ERROR_MESSAGES: Record<string, string>;
|
|
33
|
-
/**
|
|
34
|
-
* Detailed descriptions for each error code.
|
|
35
|
-
* Maps error codes to comprehensive explanations including cause and resolution.
|
|
36
|
-
*/
|
|
37
|
-
export declare const ERROR_DETAILS: Record<string, string>;
|
|
38
|
-
/**
|
|
39
|
-
* Convert an unknown error into a CryptoError.
|
|
40
|
-
*
|
|
41
|
-
* @param error - The unknown error to convert
|
|
42
|
-
* @returns A CryptoError instance
|
|
43
|
-
*/
|
|
44
|
-
export declare function toCryptoError(error: unknown): CryptoError;
|
|
45
|
-
/**
|
|
46
|
-
* Type guard to check if an error is a CryptoError.
|
|
47
|
-
*
|
|
48
|
-
* @param error - The value to check
|
|
49
|
-
* @returns true if the value is a CryptoError instance
|
|
50
|
-
*/
|
|
51
|
-
export declare function isCryptoError(error: unknown): error is CryptoError;
|
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
const a12_0x39904e = a12_0x1a13;
|
|
2
|
-
(function (_0x310496, _0x3a68c1) {
|
|
3
|
-
const a12_0x41e666 = {
|
|
4
|
-
_0x1de7a9: 0x123,
|
|
5
|
-
_0x3bd48a: 0x129,
|
|
6
|
-
_0x14cf25: 0x13f,
|
|
7
|
-
_0x2d1da8: 0x133
|
|
8
|
-
}, _0x1b258c = a12_0x1a13, _0x3253f1 = _0x310496();
|
|
9
|
-
while (!![]) {
|
|
10
|
-
try {
|
|
11
|
-
const _0x3c19aa = parseInt(_0x1b258c(a12_0x41e666._0x1de7a9)) / 0x1 * (parseInt(_0x1b258c(a12_0x41e666._0x3bd48a)) / 0x2) + -parseInt(_0x1b258c(a12_0x41e666._0x14cf25)) / 0x3 + parseInt(_0x1b258c(0x137)) / 0x4 + -parseInt(_0x1b258c(0x128)) / 0x5 + parseInt(_0x1b258c(0x124)) / 0x6 + -parseInt(_0x1b258c(0x13a)) / 0x7 * (-parseInt(_0x1b258c(0x140)) / 0x8) + -parseInt(_0x1b258c(a12_0x41e666._0x2d1da8)) / 0x9;
|
|
12
|
-
if (_0x3c19aa === _0x3a68c1)
|
|
13
|
-
break;
|
|
14
|
-
else
|
|
15
|
-
_0x3253f1['push'](_0x3253f1['shift']());
|
|
16
|
-
} catch (_0x588b3a) {
|
|
17
|
-
_0x3253f1['push'](_0x3253f1['shift']());
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}(a12_0x5190, 0x37b78));
|
|
21
|
-
const DOC_BASE = a12_0x39904e(0x132);
|
|
22
|
-
export class CryptoError extends Error {
|
|
23
|
-
[a12_0x39904e(0x13c)];
|
|
24
|
-
[a12_0x39904e(0x14c)];
|
|
25
|
-
[a12_0x39904e(0x141)];
|
|
26
|
-
constructor(_0x124995, _0x586476, _0x292f4d) {
|
|
27
|
-
const a12_0x2e48ae = {
|
|
28
|
-
_0x166a51: 0x146,
|
|
29
|
-
_0x21f589: 0x122,
|
|
30
|
-
_0x147cfe: 0x141
|
|
31
|
-
}, _0x5639d0 = a12_0x1a13, _0x573c24 = { 'PRqpB': _0x5639d0(a12_0x2e48ae._0x166a51) };
|
|
32
|
-
super(_0x586476), this['name'] = _0x573c24['PRqpB'];
|
|
33
|
-
const _0x2f9d6a = _0x124995['split'](':');
|
|
34
|
-
this[_0x5639d0(0x13c)] = _0x2f9d6a[0x0] ?? _0x124995, this[_0x5639d0(0x14c)] = _0x2f9d6a[_0x5639d0(0x12f)] > 0x1 ? _0x2f9d6a[_0x5639d0(a12_0x2e48ae._0x21f589)](0x1)['join'](':') : undefined, this[_0x5639d0(a12_0x2e48ae._0x147cfe)] = _0x292f4d;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
export class CryptoSplitError extends CryptoError {
|
|
38
|
-
constructor(_0x1b8b8f, _0x349144) {
|
|
39
|
-
const a12_0xb7a456 = { _0x3fec08: 0x147 }, _0x1a10b6 = a12_0x1a13, _0x540312 = { 'AXKqr': _0x1a10b6(0x12d) };
|
|
40
|
-
super(_0x1b8b8f, _0x349144, DOC_BASE + '#splitting'), this['name'] = _0x540312[_0x1a10b6(a12_0xb7a456._0x3fec08)];
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
function a12_0x5190() {
|
|
44
|
-
const _0x1017e0 = [
|
|
45
|
-
'uMvXDwLYzwqGveXwigzPzwXKigLZig1PC3nPBMCGzNjVBsbZzxjPywXPEMvKigrHDge',
|
|
46
|
-
'u1bmsvrFrKfjteve',
|
|
47
|
-
'qxfJt2i',
|
|
48
|
-
'C2XPy2u',
|
|
49
|
-
'ntG5ogzpqKzvwq',
|
|
50
|
-
'mJe3mdyWofjMCuX1rG',
|
|
51
|
-
'wuTmvKK',
|
|
52
|
-
'BMfTzq',
|
|
53
|
-
'q3j5ChrVugfKzgLUz0vYCM9Y',
|
|
54
|
-
'mZC3nteWuMj6rKjx',
|
|
55
|
-
'ntHwANrhr2y',
|
|
56
|
-
'u2HHCMvZigHHDMuGAw5JB25ZAxn0zw50igXLBMD0AhmSigr1CgXPy2f0zsbPBMrPy2vZlcbVCIbTAxnTyxrJAgvKihbHCMfTzxrLCNmU',
|
|
57
|
-
'ueTduYm3ihbHzgrPBMCGAxmGAw52ywXPzcbVCIbJB3jYDxb0zwq',
|
|
58
|
-
'uNnMre8',
|
|
59
|
-
'q3j5ChrVu3bSAxrfCNjVCG',
|
|
60
|
-
'wg9YsurbihjLy29UC3rYDwn0Aw9UigzHAwXLza',
|
|
61
|
-
'BgvUz3rO',
|
|
62
|
-
'BwvZC2fNzq',
|
|
63
|
-
'u3bSAxqGy29UzMLNDxjHDgLVBIbPCYbPBNzHBgLKicHUidWGmIWGAYa8idiSig9YigSGpIbUkq',
|
|
64
|
-
'Ahr0Chm6lY9WCML2yxrLlM1Ll2rVy3mVCgfJA2fNzxmVy3j5ChrV',
|
|
65
|
-
'ndCZmdGWnvPxuxr1Ca',
|
|
66
|
-
'qsbZAgfYzsbPBMrLEcbPCYbVDxqGB2yGCMfUz2uGkg11C3qGyMuGmcb0BYbUltePlG',
|
|
67
|
-
'rMv3zxiGC2HHCMvZihbYB3zPzgvKihrOyw4GDgHLihjLCxvPCMvKihrOCMvZAg9SzcbRlG',
|
|
68
|
-
'wg9YsurbihnWBgL0ig9WzxjHDgLVBIbMywLSzwqGzhvLihrVigLUDMfSAwqGAw5WDxqGB3iGy29UzMLNDxjHDgLVBI4',
|
|
69
|
-
'otiYmJa0zfHtCKvr',
|
|
70
|
-
'u3rHBMrHBg9UzsbitufdihzLCMLMAwnHDgLVBIbMywLSzwqUierHDgeGB3iGA2v5igLZigLUy29YCMvJDc4',
|
|
71
|
-
'se1bqYbPBNrLz3jPDhKGDMvYAwzPy2f0Aw9UigzHAwXLzcaTlsbKyxrHig1HEsbIzsbJB3jYDxb0zwq',
|
|
72
|
-
'n1nqr1LvDa',
|
|
73
|
-
'wg9YsurbihjLy29UC3rYDwn0Aw9UigzHAwXLzc4Gq2HLy2SGC2HHCMuGAw50zwDYAxr5igfUzcbWyxjHBwv0zxjZlG',
|
|
74
|
-
'y29Kzq',
|
|
75
|
-
'veXwigXLBMD0AcbMAwvSzcbLEgnLzwrZigf2ywLSywjSzsbKyxrHlG',
|
|
76
|
-
'uuXWqw0',
|
|
77
|
-
'mZaYmJeXzez2wfzQ',
|
|
78
|
-
'mtmZmZKXmNbtANH4uW',
|
|
79
|
-
'zg9JvxjS',
|
|
80
|
-
'se1bqY1tseeYntyGDMvYAwzPy2f0Aw9UigzHAwXLzcbKDxjPBMCGCMvJB25ZDhj1y3rPB24Uie9UzsbVCIbTB3jLihnOyxjLCYbOyxzLigjLzw4GDgfTCgvYzwqGD2L0Ac4',
|
|
81
|
-
'qw4GDw5YzwnVz25PEMvKifrmvIb0ExbLihrHzYb3yxmGzw5JB3vUDgvYzwqGAw4GysbYzxf1AxjLzcbWB3nPDgLVBI4',
|
|
82
|
-
'veXwigrHDgeGAxmGBwfSzM9YBwvKig9YihrYDw5JyxrLzc4',
|
|
83
|
-
'rw52zwXVCguGvvvjrcbKB2vZig5VDcbTyxrJAcbutfyGCgf5Bg9HzcbvvuLe',
|
|
84
|
-
'q3j5ChrVrxjYB3i',
|
|
85
|
-
'qvHlCxi',
|
|
86
|
-
'veXwigj1zMzLCIbPCYbTywXMB3jTzwqGB3iGDhj1BMnHDgvK',
|
|
87
|
-
'u2HHCMuGAw5KzxGGAxmGB3v0ig9MihjHBMDLig9Yigr1CgXPy2f0zwq',
|
|
88
|
-
'wg9YsurbihnWBgL0ig9WzxjHDgLVBIbMywLSzwq',
|
|
89
|
-
'q3j5ChrVsw50zwDYAxr5rxjYB3i',
|
|
90
|
-
'C3vIq29Kzq',
|
|
91
|
-
'u2HHCMvZigHHDMuGAw5JB25ZAxn0zw50ifvvsuqSig4Sig9YigSGDMfSDwvZ',
|
|
92
|
-
'i3nLCMLHBgL6yxrPB24',
|
|
93
|
-
'ueTduYm3ihbHzgrPBMCGyNL0zxmGyxjLigLUDMfSAwqGB3iGAw5JB25ZAxn0zw50lIbeyxrHig1HEsbIzsbJB3jYDxb0zwqU',
|
|
94
|
-
'i2LUDgvNCML0Eq',
|
|
95
|
-
'u3bSAxqGy29UzMLNDxjHDgLVBIbPCYbPBNzHBgLKlIbszxf1AxjLCYbUid49idiSigSGpJ0GmIWGyw5KigSGpd0GBI4'
|
|
96
|
-
];
|
|
97
|
-
a12_0x5190 = function () {
|
|
98
|
-
return _0x1017e0;
|
|
99
|
-
};
|
|
100
|
-
return a12_0x5190();
|
|
101
|
-
}
|
|
102
|
-
export class CryptoIntegrityError extends CryptoError {
|
|
103
|
-
constructor(_0x119116, _0xfbe164) {
|
|
104
|
-
const a12_0x42fa57 = { _0x525713: 0x150 }, _0x12acc4 = a12_0x1a13;
|
|
105
|
-
super(_0x119116, _0xfbe164, DOC_BASE + _0x12acc4(a12_0x42fa57._0x525713)), this['name'] = _0x12acc4(0x14b);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
function a12_0x1a13(_0x8935a, _0x706d44) {
|
|
109
|
-
_0x8935a = _0x8935a - 0x122;
|
|
110
|
-
const _0x5190a0 = a12_0x5190();
|
|
111
|
-
let _0x1a139b = _0x5190a0[_0x8935a];
|
|
112
|
-
if (a12_0x1a13['JvTkTY'] === undefined) {
|
|
113
|
-
var _0xa89c93 = function (_0x4e2556) {
|
|
114
|
-
const _0x22770d = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';
|
|
115
|
-
let _0x1e2638 = '', _0x20964a = '';
|
|
116
|
-
for (let _0x1bd67a = 0x0, _0x508bf5, _0x2e48de, _0x45ad41 = 0x0; _0x2e48de = _0x4e2556['charAt'](_0x45ad41++); ~_0x2e48de && (_0x508bf5 = _0x1bd67a % 0x4 ? _0x508bf5 * 0x40 + _0x2e48de : _0x2e48de, _0x1bd67a++ % 0x4) ? _0x1e2638 += String['fromCharCode'](0xff & _0x508bf5 >> (-0x2 * _0x1bd67a & 0x6)) : 0x0) {
|
|
117
|
-
_0x2e48de = _0x22770d['indexOf'](_0x2e48de);
|
|
118
|
-
}
|
|
119
|
-
for (let _0x515b4f = 0x0, _0x4a029a = _0x1e2638['length']; _0x515b4f < _0x4a029a; _0x515b4f++) {
|
|
120
|
-
_0x20964a += '%' + ('00' + _0x1e2638['charCodeAt'](_0x515b4f)['toString'](0x10))['slice'](-0x2);
|
|
121
|
-
}
|
|
122
|
-
return decodeURIComponent(_0x20964a);
|
|
123
|
-
};
|
|
124
|
-
a12_0x1a13['GjGoOk'] = _0xa89c93, a12_0x1a13['msQRCP'] = {}, a12_0x1a13['JvTkTY'] = !![];
|
|
125
|
-
}
|
|
126
|
-
const _0x54503d = _0x5190a0[0x0], _0x44ccaa = _0x8935a + _0x54503d, _0x1d81de = a12_0x1a13['msQRCP'][_0x44ccaa];
|
|
127
|
-
return !_0x1d81de ? (_0x1a139b = a12_0x1a13['GjGoOk'](_0x1a139b), a12_0x1a13['msQRCP'][_0x44ccaa] = _0x1a139b) : _0x1a139b = _0x1d81de, _0x1a139b;
|
|
128
|
-
}
|
|
129
|
-
export class CryptoPaddingError extends CryptoError {
|
|
130
|
-
constructor(_0x2a64bb, _0x234fea) {
|
|
131
|
-
const _0x239fc7 = a12_0x1a13;
|
|
132
|
-
super(_0x2a64bb, _0x234fea, DOC_BASE + '#padding'), this['name'] = _0x239fc7(0x127);
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
export class CryptoSerializationError extends CryptoError {
|
|
136
|
-
constructor(_0x5f2fcc, _0x459957) {
|
|
137
|
-
const _0x3bc81a = a12_0x1a13, _0x4a10b9 = { 'AqcOb': 'CryptoSerializationError' };
|
|
138
|
-
super(_0x5f2fcc, _0x459957, DOC_BASE + _0x3bc81a(0x14e)), this[_0x3bc81a(0x126)] = _0x4a10b9[_0x3bc81a(0x154)];
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
export const ERROR_MESSAGES = {
|
|
142
|
-
'SPLIT_FAILED': a12_0x39904e(0x14a),
|
|
143
|
-
'RECONSTRUCTION_FAILED': a12_0x39904e(0x12e),
|
|
144
|
-
'INSUFFICIENT_SHARES': 'Not\x20enough\x20shares\x20provided\x20for\x20reconstruction',
|
|
145
|
-
'INVALID_SHARES': a12_0x39904e(0x14d),
|
|
146
|
-
'INVALID_INDEX': a12_0x39904e(0x149),
|
|
147
|
-
'HMAC_FAILURE': a12_0x39904e(0x139),
|
|
148
|
-
'UUID_MISMATCH': a12_0x39904e(0x145),
|
|
149
|
-
'INVALID_PADDING': a12_0x39904e(0x12b),
|
|
150
|
-
'INVALID_TLV': a12_0x39904e(0x148),
|
|
151
|
-
'BUFFER_OVERFLOW': 'TLV\x20value\x20length\x20exceeds\x20buffer\x20bounds',
|
|
152
|
-
'MISSING_FIELD': a12_0x39904e(0x152),
|
|
153
|
-
'INVALID_CONFIG': a12_0x39904e(0x131)
|
|
154
|
-
};
|
|
155
|
-
export const ERROR_DETAILS = {
|
|
156
|
-
'INVALID_PADDING': a12_0x39904e(0x14f),
|
|
157
|
-
'HMAC_FAILURE': a12_0x39904e(0x142),
|
|
158
|
-
'INVALID_SHARES': a12_0x39904e(0x12a),
|
|
159
|
-
'INSUFFICIENT_SHARES': a12_0x39904e(0x135),
|
|
160
|
-
'INVALID_INDEX': a12_0x39904e(0x134),
|
|
161
|
-
'UUID_MISMATCH': 'Shares\x20reference\x20different\x20message\x20UUIDs\x20and\x20cannot\x20be\x20combined.',
|
|
162
|
-
'INVALID_TLV': a12_0x39904e(0x144),
|
|
163
|
-
'BUFFER_OVERFLOW': a12_0x39904e(0x13d),
|
|
164
|
-
'MISSING_FIELD': 'A\x20required\x20TLV\x20field\x20(e.g.,\x20MESSAGE_UUID)\x20is\x20absent.',
|
|
165
|
-
'INVALID_TYPE': a12_0x39904e(0x143),
|
|
166
|
-
'HMAC_MISMATCH': a12_0x39904e(0x138),
|
|
167
|
-
'KEY_ERROR': 'HMAC\x20key\x20import\x20failed\x20(invalid\x20length\x20or\x20format).',
|
|
168
|
-
'SPLIT_FAILED': a12_0x39904e(0x136),
|
|
169
|
-
'RECONSTRUCTION_FAILED': a12_0x39904e(0x13b),
|
|
170
|
-
'INVALID_CONFIG': a12_0x39904e(0x151)
|
|
171
|
-
};
|
|
172
|
-
export function toCryptoError(_0x48bae9) {
|
|
173
|
-
const a12_0x514996 = {
|
|
174
|
-
_0x5a83f0: 0x153,
|
|
175
|
-
_0x28313c: 0x125,
|
|
176
|
-
_0x565600: 0x12c
|
|
177
|
-
}, _0x80085f = a12_0x1a13, _0x58f86c = {
|
|
178
|
-
'gWhYX': function (_0xe51e7d, _0x386518) {
|
|
179
|
-
return _0xe51e7d instanceof _0x386518;
|
|
180
|
-
},
|
|
181
|
-
'YKLVI': _0x80085f(a12_0x514996._0x5a83f0),
|
|
182
|
-
'RsfDO': function (_0x18621b, _0x394d0b) {
|
|
183
|
-
return _0x18621b(_0x394d0b);
|
|
184
|
-
}
|
|
185
|
-
};
|
|
186
|
-
if (_0x58f86c['gWhYX'](_0x48bae9, CryptoError))
|
|
187
|
-
return _0x48bae9;
|
|
188
|
-
if (_0x48bae9 instanceof Error)
|
|
189
|
-
return new CryptoError(_0x58f86c[_0x80085f(a12_0x514996._0x28313c)], _0x48bae9[_0x80085f(0x130)]);
|
|
190
|
-
return new CryptoError(_0x58f86c[_0x80085f(a12_0x514996._0x28313c)], _0x58f86c[_0x80085f(a12_0x514996._0x565600)](String, _0x48bae9));
|
|
191
|
-
}
|
|
192
|
-
export function isCryptoError(_0x20097a) {
|
|
193
|
-
const a12_0x15c08b = { _0x3ead36: 0x13e }, _0x155703 = a12_0x1a13, _0x51915d = {
|
|
194
|
-
'QLpAm': function (_0x722a19, _0x47bafe) {
|
|
195
|
-
return _0x722a19 instanceof _0x47bafe;
|
|
196
|
-
}
|
|
197
|
-
};
|
|
198
|
-
return _0x51915d[_0x155703(a12_0x15c08b._0x3ead36)](_0x20097a, CryptoError);
|
|
199
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* HMAC-SHA256 integrity verification using Web Crypto API.
|
|
3
|
-
*
|
|
4
|
-
* Provides message-level integrity for the XorIDA pipeline.
|
|
5
|
-
* The HMAC is computed over the padded payload (after TLV serialization + PKCS#7 padding)
|
|
6
|
-
* and verified after reconstruction, before unpadding.
|
|
7
|
-
*
|
|
8
|
-
* Uses crypto.subtle for constant-time verification (no manual byte comparison).
|
|
9
|
-
*/
|
|
10
|
-
/**
|
|
11
|
-
* Generate a fresh random HMAC key and sign data with HMAC-SHA256.
|
|
12
|
-
*
|
|
13
|
-
* @param data - Bytes to sign (the padded payload)
|
|
14
|
-
* @returns Object containing the raw key bytes and the 32-byte signature
|
|
15
|
-
*/
|
|
16
|
-
export declare function generateHMAC(data: Uint8Array): Promise<{
|
|
17
|
-
key: Uint8Array;
|
|
18
|
-
signature: Uint8Array;
|
|
19
|
-
}>;
|
|
20
|
-
/**
|
|
21
|
-
* Verify an HMAC-SHA256 signature using constant-time comparison.
|
|
22
|
-
*
|
|
23
|
-
* Uses crypto.subtle.verify() which is constant-time by specification.
|
|
24
|
-
* NEVER manually compare HMAC bytes (timing attack risk).
|
|
25
|
-
*
|
|
26
|
-
* @param key - Raw HMAC key bytes (32 bytes)
|
|
27
|
-
* @param data - Data that was signed
|
|
28
|
-
* @param signature - Expected HMAC-SHA256 signature (32 bytes)
|
|
29
|
-
* @returns true if signature is valid, false otherwise
|
|
30
|
-
*/
|
|
31
|
-
export declare function verifyHMAC(key: Uint8Array, data: Uint8Array, signature: Uint8Array): Promise<boolean>;
|
|
32
|
-
/**
|
|
33
|
-
* Sign data with a provided HMAC key (for cases where the key is already known).
|
|
34
|
-
*
|
|
35
|
-
* @param key - Raw HMAC key bytes (32 bytes)
|
|
36
|
-
* @param data - Bytes to sign
|
|
37
|
-
* @returns 32-byte HMAC-SHA256 signature
|
|
38
|
-
*/
|
|
39
|
-
export declare function signHMAC(key: Uint8Array, data: Uint8Array): Promise<Uint8Array>;
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
function a13_0x1ca6(_0x48a37a, _0x452647) {
|
|
2
|
-
_0x48a37a = _0x48a37a - 0xc2;
|
|
3
|
-
const _0x405f92 = a13_0x405f();
|
|
4
|
-
let _0x1ca601 = _0x405f92[_0x48a37a];
|
|
5
|
-
if (a13_0x1ca6['LsRwYR'] === undefined) {
|
|
6
|
-
var _0x7879cd = function (_0x1bfa6d) {
|
|
7
|
-
const _0x5a8e80 = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';
|
|
8
|
-
let _0x11c5cf = '', _0x1e2beb = '';
|
|
9
|
-
for (let _0xde76e9 = 0x0, _0x5a90c9, _0x572400, _0x5745c1 = 0x0; _0x572400 = _0x1bfa6d['charAt'](_0x5745c1++); ~_0x572400 && (_0x5a90c9 = _0xde76e9 % 0x4 ? _0x5a90c9 * 0x40 + _0x572400 : _0x572400, _0xde76e9++ % 0x4) ? _0x11c5cf += String['fromCharCode'](0xff & _0x5a90c9 >> (-0x2 * _0xde76e9 & 0x6)) : 0x0) {
|
|
10
|
-
_0x572400 = _0x5a8e80['indexOf'](_0x572400);
|
|
11
|
-
}
|
|
12
|
-
for (let _0x3ebeb1 = 0x0, _0x38e688 = _0x11c5cf['length']; _0x3ebeb1 < _0x38e688; _0x3ebeb1++) {
|
|
13
|
-
_0x1e2beb += '%' + ('00' + _0x11c5cf['charCodeAt'](_0x3ebeb1)['toString'](0x10))['slice'](-0x2);
|
|
14
|
-
}
|
|
15
|
-
return decodeURIComponent(_0x1e2beb);
|
|
16
|
-
};
|
|
17
|
-
a13_0x1ca6['YhruJl'] = _0x7879cd, a13_0x1ca6['WzgAox'] = {}, a13_0x1ca6['LsRwYR'] = !![];
|
|
18
|
-
}
|
|
19
|
-
const _0x5b54de = _0x405f92[0x0], _0x31dbe6 = _0x48a37a + _0x5b54de, _0xa5ec58 = a13_0x1ca6['WzgAox'][_0x31dbe6];
|
|
20
|
-
return !_0xa5ec58 ? (_0x1ca601 = a13_0x1ca6['YhruJl'](_0x1ca601), a13_0x1ca6['WzgAox'][_0x31dbe6] = _0x1ca601) : _0x1ca601 = _0xa5ec58, _0x1ca601;
|
|
21
|
-
}
|
|
22
|
-
function a13_0x405f() {
|
|
23
|
-
const _0x306756 = [
|
|
24
|
-
'Ce9TBNi',
|
|
25
|
-
'vMfUvK0',
|
|
26
|
-
'mtuXmZmZnJHoz3z5u3m',
|
|
27
|
-
'Aw1WB3j0s2v5',
|
|
28
|
-
'mMziBKruBq',
|
|
29
|
-
'yNL0zuXLBMD0Aa',
|
|
30
|
-
'n2Thu2jTEa',
|
|
31
|
-
'CMf3',
|
|
32
|
-
'C3vIDgXL',
|
|
33
|
-
'mZG5ndG0BhzpDuDY',
|
|
34
|
-
'se1bqW',
|
|
35
|
-
'u0Hblti1nG',
|
|
36
|
-
'mta4ovbMug9uCG',
|
|
37
|
-
'DMvYAwz5',
|
|
38
|
-
'z2v0uMfUzg9TvMfSDwvZ',
|
|
39
|
-
'mtKXmZb5qxDlvK0',
|
|
40
|
-
'u2zlBMG',
|
|
41
|
-
'ntuWotyZnMnUC1Lzwq',
|
|
42
|
-
'C2v0',
|
|
43
|
-
'uhrctha',
|
|
44
|
-
'nez6Dw9wqq',
|
|
45
|
-
'mtu1sg1evxjL',
|
|
46
|
-
'ody1otuWnhDMA3r0Ca',
|
|
47
|
-
'C2LNBG',
|
|
48
|
-
'mJqYnJe5oujmALjABq',
|
|
49
|
-
'mJa0mda2Ew1Zvgjy'
|
|
50
|
-
];
|
|
51
|
-
a13_0x405f = function () {
|
|
52
|
-
return _0x306756;
|
|
53
|
-
};
|
|
54
|
-
return a13_0x405f();
|
|
55
|
-
}
|
|
56
|
-
const a13_0x2b37a8 = a13_0x1ca6;
|
|
57
|
-
(function (_0x257b18, _0x5450d9) {
|
|
58
|
-
const a13_0x186c23 = {
|
|
59
|
-
_0x575645: 0xda,
|
|
60
|
-
_0x313a56: 0xcb,
|
|
61
|
-
_0x2b77cf: 0xcc,
|
|
62
|
-
_0x42e6e9: 0xd7,
|
|
63
|
-
_0x556f79: 0xc3,
|
|
64
|
-
_0x3fc653: 0xc6,
|
|
65
|
-
_0x5e81b2: 0xc8
|
|
66
|
-
}, _0x4645c0 = a13_0x1ca6, _0x3d18d0 = _0x257b18();
|
|
67
|
-
while (!![]) {
|
|
68
|
-
try {
|
|
69
|
-
const _0x2bf66c = -parseInt(_0x4645c0(a13_0x186c23._0x575645)) / 0x1 * (-parseInt(_0x4645c0(0xd5)) / 0x2) + -parseInt(_0x4645c0(0xcf)) / 0x3 * (parseInt(_0x4645c0(a13_0x186c23._0x313a56)) / 0x4) + -parseInt(_0x4645c0(a13_0x186c23._0x2b77cf)) / 0x5 * (parseInt(_0x4645c0(0xd0)) / 0x6) + -parseInt(_0x4645c0(a13_0x186c23._0x42e6e9)) / 0x7 * (-parseInt(_0x4645c0(0xcd)) / 0x8) + -parseInt(_0x4645c0(a13_0x186c23._0x556f79)) / 0x9 * (-parseInt(_0x4645c0(a13_0x186c23._0x3fc653)) / 0xa) + -parseInt(_0x4645c0(a13_0x186c23._0x5e81b2)) / 0xb + parseInt(_0x4645c0(0xd3)) / 0xc;
|
|
70
|
-
if (_0x2bf66c === _0x5450d9)
|
|
71
|
-
break;
|
|
72
|
-
else
|
|
73
|
-
_0x3d18d0['push'](_0x3d18d0['shift']());
|
|
74
|
-
} catch (_0x171634) {
|
|
75
|
-
_0x3d18d0['push'](_0x3d18d0['shift']());
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}(a13_0x405f, 0x92b25));
|
|
79
|
-
const HMAC_KEY_LENGTH = 0x20, HMAC_ALGO = {
|
|
80
|
-
'name': 'HMAC',
|
|
81
|
-
'hash': a13_0x2b37a8(0xc2)
|
|
82
|
-
};
|
|
83
|
-
function toArrayBuffer(_0x416c6c) {
|
|
84
|
-
const a13_0xca334b = { _0x2ec83d: 0xd6 }, _0x456197 = a13_0x1ca6, _0x2d2005 = new ArrayBuffer(_0x416c6c[_0x456197(a13_0xca334b._0x2ec83d)]);
|
|
85
|
-
return new Uint8Array(_0x2d2005)[_0x456197(0xc9)](_0x416c6c), _0x2d2005;
|
|
86
|
-
}
|
|
87
|
-
async function importKey(_0x15b0d4, _0x30e7d2) {
|
|
88
|
-
const _0x2fa2c2 = a13_0x1ca6;
|
|
89
|
-
return crypto[_0x2fa2c2(0xd9)][_0x2fa2c2(0xd4)](_0x2fa2c2(0xd8), toArrayBuffer(_0x15b0d4), HMAC_ALGO, ![], [_0x30e7d2]);
|
|
90
|
-
}
|
|
91
|
-
export async function generateHMAC(_0x23773a) {
|
|
92
|
-
const a13_0x2ef102 = {
|
|
93
|
-
_0x5c1074: 0xc5,
|
|
94
|
-
_0x2bcc79: 0xce,
|
|
95
|
-
_0x5aa2b7: 0xdb
|
|
96
|
-
}, _0x40e6b9 = a13_0x1ca6, _0x58f5c8 = {
|
|
97
|
-
'PtBLp': function (_0x35fea8, _0x146c53, _0x7fd38c) {
|
|
98
|
-
return _0x35fea8(_0x146c53, _0x7fd38c);
|
|
99
|
-
},
|
|
100
|
-
'VanVM': _0x40e6b9(0xce)
|
|
101
|
-
}, _0xe8a7ee = new Uint8Array(HMAC_KEY_LENGTH);
|
|
102
|
-
crypto[_0x40e6b9(a13_0x2ef102._0x5c1074)](_0xe8a7ee);
|
|
103
|
-
const _0x1954ff = await _0x58f5c8[_0x40e6b9(0xca)](importKey, _0xe8a7ee, _0x58f5c8[_0x40e6b9(0xd2)]), _0x438061 = await crypto[_0x40e6b9(0xd9)][_0x40e6b9(a13_0x2ef102._0x2bcc79)](_0x40e6b9(a13_0x2ef102._0x5aa2b7), _0x1954ff, toArrayBuffer(_0x23773a));
|
|
104
|
-
return {
|
|
105
|
-
'key': _0xe8a7ee,
|
|
106
|
-
'signature': new Uint8Array(_0x438061)
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
export async function verifyHMAC(_0x1cf411, _0x4ac8be, _0x30879b) {
|
|
110
|
-
const a13_0x22b7fb = {
|
|
111
|
-
_0x4b5755: 0xc4,
|
|
112
|
-
_0x25235f: 0xd9
|
|
113
|
-
}, _0xbd78c4 = a13_0x1ca6, _0x64865e = {
|
|
114
|
-
'SfKnh': function (_0x2baf2b, _0x1130c1, _0x2d76fa) {
|
|
115
|
-
return _0x2baf2b(_0x1130c1, _0x2d76fa);
|
|
116
|
-
},
|
|
117
|
-
'TiMOI': function (_0x23cd33, _0x46599c) {
|
|
118
|
-
return _0x23cd33(_0x46599c);
|
|
119
|
-
}
|
|
120
|
-
}, _0x38c19e = await _0x64865e[_0xbd78c4(0xc7)](importKey, _0x1cf411, _0xbd78c4(a13_0x22b7fb._0x4b5755));
|
|
121
|
-
return crypto[_0xbd78c4(a13_0x22b7fb._0x25235f)][_0xbd78c4(a13_0x22b7fb._0x4b5755)](_0xbd78c4(0xdb), _0x38c19e, toArrayBuffer(_0x30879b), _0x64865e['TiMOI'](toArrayBuffer, _0x4ac8be));
|
|
122
|
-
}
|
|
123
|
-
export async function signHMAC(_0x27bf8c, _0x5a0b28) {
|
|
124
|
-
const a13_0x47233c = { _0x37ac87: 0xce }, _0x312e22 = a13_0x1ca6, _0x565241 = {
|
|
125
|
-
'DMaSm': function (_0xbdf52a, _0x254b1b, _0x22645e) {
|
|
126
|
-
return _0xbdf52a(_0x254b1b, _0x22645e);
|
|
127
|
-
},
|
|
128
|
-
'ujumj': _0x312e22(0xce),
|
|
129
|
-
'pOmnr': function (_0x1796e6, _0x572008) {
|
|
130
|
-
return _0x1796e6(_0x572008);
|
|
131
|
-
}
|
|
132
|
-
}, _0xdf5cfa = await _0x565241['DMaSm'](importKey, _0x27bf8c, _0x565241['ujumj']), _0x18ab85 = await crypto[_0x312e22(0xd9)][_0x312e22(a13_0x47233c._0x37ac87)](_0x312e22(0xdb), _0xdf5cfa, _0x565241[_0x312e22(0xd1)](toArrayBuffer, _0x5a0b28));
|
|
133
|
-
return new Uint8Array(_0x18ab85);
|
|
134
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export * from './errors.js';
|
|
2
|
-
export { splitXorIDA, reconstructXorIDA, nextOddPrime } from './xorida.js';
|
|
3
|
-
export { pkcs7Pad, pkcs7Unpad } from './padding.js';
|
|
4
|
-
export { generateHMAC, verifyHMAC, signHMAC } from './hmac.js';
|
|
5
|
-
export { serializeMessage, deserializeMessage } from './tlv.js';
|
|
6
|
-
export { generateUUID, uuidToBytes, bytesToUuid } from './uuid.js';
|
|
7
|
-
export { toBase64, fromBase64, toBase64Url, fromBase64Url } from './base64.js';
|
|
8
|
-
export { createShares, reconstructMessage } from './shares.js';
|
|
9
|
-
export { formatShareHeader, parseShareHeader, hasShareHeader } from './share-header.js';
|
|
10
|
-
/**
|
|
11
|
-
* Check if the runtime supports the required Web Crypto APIs.
|
|
12
|
-
*
|
|
13
|
-
* Verifies that `crypto.subtle` is available with HMAC, AES-GCM,
|
|
14
|
-
* and `crypto.getRandomValues`. Call this before using any crypto
|
|
15
|
-
* operations to provide a clear error message on unsupported runtimes.
|
|
16
|
-
*
|
|
17
|
-
* @returns `true` if the runtime has the required Web Crypto APIs.
|
|
18
|
-
*/
|
|
19
|
-
export declare function isSupported(): boolean;
|
|
20
|
-
export { splitWithRandom } from './xorida.js';
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
(function (_0x4c7843, _0x46a5dc) {
|
|
2
|
-
var a14_0x22b02e = {
|
|
3
|
-
_0x3c474c: 0x188,
|
|
4
|
-
_0x377d28: 0x185,
|
|
5
|
-
_0x25e2fe: 0x190,
|
|
6
|
-
_0x4ce54c: 0x191
|
|
7
|
-
}, _0x2995eb = a14_0x5571, _0x1e7040 = _0x4c7843();
|
|
8
|
-
while (!![]) {
|
|
9
|
-
try {
|
|
10
|
-
var _0x4c3963 = parseInt(_0x2995eb(a14_0x22b02e._0x3c474c)) / 0x1 + parseInt(_0x2995eb(0x17d)) / 0x2 * (-parseInt(_0x2995eb(0x187)) / 0x3) + parseInt(_0x2995eb(a14_0x22b02e._0x377d28)) / 0x4 * (-parseInt(_0x2995eb(0x180)) / 0x5) + -parseInt(_0x2995eb(a14_0x22b02e._0x25e2fe)) / 0x6 * (parseInt(_0x2995eb(0x189)) / 0x7) + -parseInt(_0x2995eb(a14_0x22b02e._0x4ce54c)) / 0x8 + -parseInt(_0x2995eb(0x18f)) / 0x9 + parseInt(_0x2995eb(0x18d)) / 0xa;
|
|
11
|
-
if (_0x4c3963 === _0x46a5dc)
|
|
12
|
-
break;
|
|
13
|
-
else
|
|
14
|
-
_0x1e7040['push'](_0x1e7040['shift']());
|
|
15
|
-
} catch (_0x22da6e) {
|
|
16
|
-
_0x1e7040['push'](_0x1e7040['shift']());
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}(a14_0x2127, 0xd27cd));
|
|
20
|
-
export * from './errors.js';
|
|
21
|
-
export {
|
|
22
|
-
splitXorIDA,
|
|
23
|
-
reconstructXorIDA,
|
|
24
|
-
nextOddPrime
|
|
25
|
-
} from './xorida.js';
|
|
26
|
-
function a14_0x5571(_0x4876bb, _0x31e512) {
|
|
27
|
-
_0x4876bb = _0x4876bb - 0x17d;
|
|
28
|
-
var _0x2127a2 = a14_0x2127();
|
|
29
|
-
var _0x5571fe = _0x2127a2[_0x4876bb];
|
|
30
|
-
if (a14_0x5571['BnCYOE'] === undefined) {
|
|
31
|
-
var _0x4146db = function (_0x31aa5a) {
|
|
32
|
-
var _0x4bd38a = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';
|
|
33
|
-
var _0x510aa4 = '', _0x4e7687 = '';
|
|
34
|
-
for (var _0x6543b3 = 0x0, _0x3ce4ff, _0x38c98e, _0x34723e = 0x0; _0x38c98e = _0x31aa5a['charAt'](_0x34723e++); ~_0x38c98e && (_0x3ce4ff = _0x6543b3 % 0x4 ? _0x3ce4ff * 0x40 + _0x38c98e : _0x38c98e, _0x6543b3++ % 0x4) ? _0x510aa4 += String['fromCharCode'](0xff & _0x3ce4ff >> (-0x2 * _0x6543b3 & 0x6)) : 0x0) {
|
|
35
|
-
_0x38c98e = _0x4bd38a['indexOf'](_0x38c98e);
|
|
36
|
-
}
|
|
37
|
-
for (var _0x5de9f5 = 0x0, _0x4886cb = _0x510aa4['length']; _0x5de9f5 < _0x4886cb; _0x5de9f5++) {
|
|
38
|
-
_0x4e7687 += '%' + ('00' + _0x510aa4['charCodeAt'](_0x5de9f5)['toString'](0x10))['slice'](-0x2);
|
|
39
|
-
}
|
|
40
|
-
return decodeURIComponent(_0x4e7687);
|
|
41
|
-
};
|
|
42
|
-
a14_0x5571['RaCtgR'] = _0x4146db, a14_0x5571['vMywxF'] = {}, a14_0x5571['BnCYOE'] = !![];
|
|
43
|
-
}
|
|
44
|
-
var _0x534cf1 = _0x2127a2[0x0], _0x49dbe8 = _0x4876bb + _0x534cf1, _0x31134b = a14_0x5571['vMywxF'][_0x49dbe8];
|
|
45
|
-
return !_0x31134b ? (_0x5571fe = a14_0x5571['RaCtgR'](_0x5571fe), a14_0x5571['vMywxF'][_0x49dbe8] = _0x5571fe) : _0x5571fe = _0x31134b, _0x5571fe;
|
|
46
|
-
}
|
|
47
|
-
export {
|
|
48
|
-
pkcs7Pad,
|
|
49
|
-
pkcs7Unpad
|
|
50
|
-
} from './padding.js';
|
|
51
|
-
export {
|
|
52
|
-
generateHMAC,
|
|
53
|
-
verifyHMAC,
|
|
54
|
-
signHMAC
|
|
55
|
-
} from './hmac.js';
|
|
56
|
-
function a14_0x2127() {
|
|
57
|
-
var _0x334b09 = [
|
|
58
|
-
'mZCXntK1mKzvDLLHAW',
|
|
59
|
-
'r2DwsNO',
|
|
60
|
-
'ntiZmJm2vK52D0fP',
|
|
61
|
-
'y3j5ChrV',
|
|
62
|
-
'DMvYAwz5',
|
|
63
|
-
'mtCXndv0s2rKwMC',
|
|
64
|
-
'suDHquS',
|
|
65
|
-
'Dw5KzwzPBMvK',
|
|
66
|
-
'z292sfe',
|
|
67
|
-
'zw5JCNLWDa',
|
|
68
|
-
'mtuYnhPXrfLQDW',
|
|
69
|
-
'C2LNBG',
|
|
70
|
-
'm3jOv2LRva',
|
|
71
|
-
'nJK4mZqYv0Dcsejv',
|
|
72
|
-
'ody0nwjkwvr3zW',
|
|
73
|
-
'C3vIDgXL',
|
|
74
|
-
'Aw1WB3j0s2v5',
|
|
75
|
-
'z2v0uMfUzg9TvMfSDwvZ',
|
|
76
|
-
'mJmZotm0mZbkDgPSv2m',
|
|
77
|
-
'zNvUy3rPB24',
|
|
78
|
-
'nJC1mZC4y09xALDv',
|
|
79
|
-
'mZmWA2DUAgv5'
|
|
80
|
-
];
|
|
81
|
-
a14_0x2127 = function () {
|
|
82
|
-
return _0x334b09;
|
|
83
|
-
};
|
|
84
|
-
return a14_0x2127();
|
|
85
|
-
}
|
|
86
|
-
export {
|
|
87
|
-
serializeMessage,
|
|
88
|
-
deserializeMessage
|
|
89
|
-
} from './tlv.js';
|
|
90
|
-
export {
|
|
91
|
-
generateUUID,
|
|
92
|
-
uuidToBytes,
|
|
93
|
-
bytesToUuid
|
|
94
|
-
} from './uuid.js';
|
|
95
|
-
export {
|
|
96
|
-
toBase64,
|
|
97
|
-
fromBase64,
|
|
98
|
-
toBase64Url,
|
|
99
|
-
fromBase64Url
|
|
100
|
-
} from './base64.js';
|
|
101
|
-
export {
|
|
102
|
-
createShares,
|
|
103
|
-
reconstructMessage
|
|
104
|
-
} from './shares.js';
|
|
105
|
-
export {
|
|
106
|
-
formatShareHeader,
|
|
107
|
-
parseShareHeader,
|
|
108
|
-
hasShareHeader
|
|
109
|
-
} from './share-header.js';
|
|
110
|
-
export function isSupported() {
|
|
111
|
-
var a14_0x362d50 = {
|
|
112
|
-
_0x82f70e: 0x18e,
|
|
113
|
-
_0x42d61d: 0x182,
|
|
114
|
-
_0xc979ce: 0x17e,
|
|
115
|
-
_0x5b06d7: 0x18a,
|
|
116
|
-
_0x2c2498: 0x18b,
|
|
117
|
-
_0x212428: 0x192,
|
|
118
|
-
_0x1a04fd: 0x186,
|
|
119
|
-
_0x1a2977: 0x183,
|
|
120
|
-
_0x3faae8: 0x18a,
|
|
121
|
-
_0x4f16ea: 0x18e
|
|
122
|
-
}, _0x36062c = a14_0x5571, _0x3ecd63 = {
|
|
123
|
-
'btAPd': function (_0x230743, _0x225465) {
|
|
124
|
-
return _0x230743 !== _0x225465;
|
|
125
|
-
},
|
|
126
|
-
'IGaAK': _0x36062c(a14_0x362d50._0x82f70e),
|
|
127
|
-
'GgVJz': function (_0xafb171, _0x403c54) {
|
|
128
|
-
return _0xafb171 === _0x403c54;
|
|
129
|
-
},
|
|
130
|
-
'govHQ': function (_0xa3307e, _0x491fe2) {
|
|
131
|
-
return _0xa3307e === _0x491fe2;
|
|
132
|
-
},
|
|
133
|
-
'nNEuG': function (_0x2c260d, _0x438783) {
|
|
134
|
-
return _0x2c260d === _0x438783;
|
|
135
|
-
}
|
|
136
|
-
};
|
|
137
|
-
try {
|
|
138
|
-
return _0x3ecd63['btAPd'](typeof globalThis[_0x36062c(0x17e)], _0x36062c(a14_0x362d50._0x42d61d)) && typeof globalThis['crypto']['subtle'] !== 'undefined' && typeof globalThis[_0x36062c(a14_0x362d50._0xc979ce)][_0x36062c(a14_0x362d50._0x5b06d7)][_0x36062c(a14_0x362d50._0x2c2498)] === _0x3ecd63[_0x36062c(0x181)] && _0x3ecd63[_0x36062c(a14_0x362d50._0x212428)](typeof globalThis[_0x36062c(0x17e)][_0x36062c(0x18a)][_0x36062c(a14_0x362d50._0x1a04fd)], _0x36062c(a14_0x362d50._0x82f70e)) && _0x3ecd63[_0x36062c(a14_0x362d50._0x1a2977)](typeof globalThis['crypto'][_0x36062c(a14_0x362d50._0x5b06d7)][_0x36062c(0x17f)], 'function') && _0x3ecd63['nNEuG'](typeof globalThis['crypto'][_0x36062c(a14_0x362d50._0x3faae8)][_0x36062c(0x184)], _0x36062c(a14_0x362d50._0x4f16ea)) && typeof globalThis['crypto'][_0x36062c(0x18c)] === _0x36062c(a14_0x362d50._0x4f16ea);
|
|
139
|
-
} catch {
|
|
140
|
-
return ![];
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
export {
|
|
144
|
-
splitWithRandom
|
|
145
|
-
} from './xorida.js';
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Result, PaddingError } from '@private.me/shared';
|
|
2
|
-
/**
|
|
3
|
-
* PKCS#7 pad data to a multiple of blockSize bytes.
|
|
4
|
-
* Always adds at least 1 byte of padding, even when already aligned.
|
|
5
|
-
*
|
|
6
|
-
* @param data - Input bytes to pad
|
|
7
|
-
* @param blockSize - Block size in bytes (must be 1–255)
|
|
8
|
-
* @returns Padded byte array
|
|
9
|
-
*/
|
|
10
|
-
export declare function pkcs7Pad(data: Uint8Array, blockSize: number): Uint8Array;
|
|
11
|
-
/**
|
|
12
|
-
* Remove PKCS#7 padding. Validates that padding bytes are consistent.
|
|
13
|
-
* Returns an error if padding is invalid (possible tampering).
|
|
14
|
-
*
|
|
15
|
-
* @param data - Padded byte array
|
|
16
|
-
* @param blockSize - Block size used during padding (must be 1–255)
|
|
17
|
-
* @returns Unpadded bytes, or PaddingError if invalid
|
|
18
|
-
*/
|
|
19
|
-
export declare function pkcs7Unpad(data: Uint8Array, blockSize: number): Result<Uint8Array, PaddingError>;
|