@wireapp/core-crypto 9.1.0 → 9.1.2
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/package.json
CHANGED
|
Binary file
|
|
@@ -246,12 +246,12 @@ export const __wbg_get_decryptedmessage_senderClientId: (a: number) => number;
|
|
|
246
246
|
export const __wbg_get_decryptedmessage_identity: (a: number) => number;
|
|
247
247
|
export const __wbg_get_decryptedmessage_commitDelay: (a: number) => [number, bigint];
|
|
248
248
|
export const __wbg_get_decryptedmessage_message: (a: number) => [number, number];
|
|
249
|
-
export const secretkey_new: (a: number, b: number) => number;
|
|
250
249
|
export const keypackage_new: (a: number, b: number) => number;
|
|
250
|
+
export const externalsenderkey_new: (a: number, b: number) => number;
|
|
251
|
+
export const groupinfo_new: (a: number, b: number) => number;
|
|
252
|
+
export const secretkey_new: (a: number, b: number) => number;
|
|
251
253
|
export const welcome_new: (a: number, b: number) => number;
|
|
252
254
|
export const conversationid_new: (a: number, b: number) => number;
|
|
253
|
-
export const groupinfo_new: (a: number, b: number) => number;
|
|
254
|
-
export const externalsenderkey_new: (a: number, b: number) => number;
|
|
255
255
|
export const __wbg_proteusautoprekeybundle_free: (a: number, b: number) => void;
|
|
256
256
|
export const __wbg_welcome_free: (a: number, b: number) => void;
|
|
257
257
|
export const __wbg_mlstransportdata_free: (a: number, b: number) => void;
|
|
@@ -267,11 +267,11 @@ export const __wbindgen_exn_store: (a: number) => void;
|
|
|
267
267
|
export const __externref_table_alloc: () => number;
|
|
268
268
|
export const __wbindgen_export_4: WebAssembly.Table;
|
|
269
269
|
export const __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
270
|
-
export const __wbindgen_export_6: WebAssembly.Table;
|
|
271
270
|
export const __externref_drop_slice: (a: number, b: number) => void;
|
|
271
|
+
export const __wbindgen_export_7: WebAssembly.Table;
|
|
272
272
|
export const __externref_table_dealloc: (a: number) => void;
|
|
273
|
-
export const closure2587_externref_shim: (a: number, b: number, c: any) => void;
|
|
274
|
-
export const closure2899_externref_shim: (a: number, b: number, c: any) => void;
|
|
275
273
|
export const closure1021_externref_shim: (a: number, b: number, c: any) => void;
|
|
276
|
-
export const
|
|
274
|
+
export const closure2587_externref_shim: (a: number, b: number, c: any) => void;
|
|
275
|
+
export const closure2900_externref_shim: (a: number, b: number, c: any) => void;
|
|
276
|
+
export const closure3001_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
277
277
|
export const __wbindgen_start: () => void;
|
package/src/corecrypto.js
CHANGED
|
@@ -327,8 +327,18 @@ ${val.stack}`;
|
|
|
327
327
|
}
|
|
328
328
|
return className;
|
|
329
329
|
}
|
|
330
|
+
function getArrayJsValueFromWasm0(ptr, len) {
|
|
331
|
+
ptr = ptr >>> 0;
|
|
332
|
+
const mem = getDataViewMemory0();
|
|
333
|
+
const result = [];
|
|
334
|
+
for (let i = ptr;i < ptr + 4 * len; i += 4) {
|
|
335
|
+
result.push(wasm.__wbindgen_export_4.get(mem.getUint32(i, true)));
|
|
336
|
+
}
|
|
337
|
+
wasm.__externref_drop_slice(ptr, len);
|
|
338
|
+
return result;
|
|
339
|
+
}
|
|
330
340
|
var CLOSURE_DTORS = typeof FinalizationRegistry === "undefined" ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((state) => {
|
|
331
|
-
wasm.
|
|
341
|
+
wasm.__wbindgen_export_7.get(state.dtor)(state.a, state.b);
|
|
332
342
|
});
|
|
333
343
|
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
334
344
|
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
@@ -340,7 +350,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
340
350
|
return f(a, state.b, ...args);
|
|
341
351
|
} finally {
|
|
342
352
|
if (--state.cnt === 0) {
|
|
343
|
-
wasm.
|
|
353
|
+
wasm.__wbindgen_export_7.get(state.dtor)(a, state.b);
|
|
344
354
|
CLOSURE_DTORS.unregister(state);
|
|
345
355
|
} else {
|
|
346
356
|
state.a = a;
|
|
@@ -351,16 +361,6 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
351
361
|
CLOSURE_DTORS.register(real, state, state);
|
|
352
362
|
return real;
|
|
353
363
|
}
|
|
354
|
-
function getArrayJsValueFromWasm0(ptr, len) {
|
|
355
|
-
ptr = ptr >>> 0;
|
|
356
|
-
const mem = getDataViewMemory0();
|
|
357
|
-
const result = [];
|
|
358
|
-
for (let i = ptr;i < ptr + 4 * len; i += 4) {
|
|
359
|
-
result.push(wasm.__wbindgen_export_4.get(mem.getUint32(i, true)));
|
|
360
|
-
}
|
|
361
|
-
wasm.__externref_drop_slice(ptr, len);
|
|
362
|
-
return result;
|
|
363
|
-
}
|
|
364
364
|
function _assertClass(instance, klass) {
|
|
365
365
|
if (!(instance instanceof klass)) {
|
|
366
366
|
throw new Error(`expected instance of ${klass.name}`);
|
|
@@ -438,17 +438,17 @@ function build_metadata() {
|
|
|
438
438
|
const ret = wasm.build_metadata();
|
|
439
439
|
return BuildMetadata.__wrap(ret);
|
|
440
440
|
}
|
|
441
|
-
function
|
|
442
|
-
wasm.
|
|
441
|
+
function __wbg_adapter_10(arg0, arg1, arg2) {
|
|
442
|
+
wasm.closure1021_externref_shim(arg0, arg1, arg2);
|
|
443
443
|
}
|
|
444
|
-
function
|
|
445
|
-
wasm.
|
|
444
|
+
function __wbg_adapter_15(arg0, arg1, arg2) {
|
|
445
|
+
wasm.closure2587_externref_shim(arg0, arg1, arg2);
|
|
446
446
|
}
|
|
447
447
|
function __wbg_adapter_18(arg0, arg1, arg2) {
|
|
448
|
-
wasm.
|
|
448
|
+
wasm.closure2900_externref_shim(arg0, arg1, arg2);
|
|
449
449
|
}
|
|
450
450
|
function __wbg_adapter_510(arg0, arg1, arg2, arg3) {
|
|
451
|
-
wasm.
|
|
451
|
+
wasm.closure3001_externref_shim(arg0, arg1, arg2, arg3);
|
|
452
452
|
}
|
|
453
453
|
var Ciphersuite = Object.freeze({
|
|
454
454
|
MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519: 1,
|
|
@@ -2909,7 +2909,7 @@ function __wbg_get_imports() {
|
|
|
2909
2909
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
2910
2910
|
}
|
|
2911
2911
|
};
|
|
2912
|
-
imports.wbg.
|
|
2912
|
+
imports.wbg.__wbg_execute_7a329812137e03ee = function() {
|
|
2913
2913
|
return handleError(function(arg0, arg1) {
|
|
2914
2914
|
const ret = arg0.execute(CoreCryptoContext.__wrap(arg1));
|
|
2915
2915
|
return ret;
|
|
@@ -3541,10 +3541,6 @@ function __wbg_get_imports() {
|
|
|
3541
3541
|
const ret = WireIdentity.__wrap(arg0);
|
|
3542
3542
|
return ret;
|
|
3543
3543
|
};
|
|
3544
|
-
imports.wbg.__wbindgen_cast_1ead7d7e37c24a99 = function(arg0, arg1) {
|
|
3545
|
-
const ret = makeMutClosure(arg0, arg1, 2898, __wbg_adapter_11);
|
|
3546
|
-
return ret;
|
|
3547
|
-
};
|
|
3548
3544
|
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
3549
3545
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
3550
3546
|
return ret;
|
|
@@ -3561,6 +3557,10 @@ function __wbg_get_imports() {
|
|
|
3561
3557
|
const ret = v0;
|
|
3562
3558
|
return ret;
|
|
3563
3559
|
};
|
|
3560
|
+
imports.wbg.__wbindgen_cast_3b24be8277f06041 = function(arg0, arg1) {
|
|
3561
|
+
const ret = makeMutClosure(arg0, arg1, 2899, __wbg_adapter_18);
|
|
3562
|
+
return ret;
|
|
3563
|
+
};
|
|
3564
3564
|
imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
|
|
3565
3565
|
const ret = BigInt.asUintN(64, arg0);
|
|
3566
3566
|
return ret;
|
|
@@ -3572,7 +3572,7 @@ function __wbg_get_imports() {
|
|
|
3572
3572
|
return ret;
|
|
3573
3573
|
};
|
|
3574
3574
|
imports.wbg.__wbindgen_cast_63e1f1d269ff3fa8 = function(arg0, arg1) {
|
|
3575
|
-
const ret = makeMutClosure(arg0, arg1, 2586,
|
|
3575
|
+
const ret = makeMutClosure(arg0, arg1, 2586, __wbg_adapter_15);
|
|
3576
3576
|
return ret;
|
|
3577
3577
|
};
|
|
3578
3578
|
imports.wbg.__wbindgen_cast_77bc3e92745e9a35 = function(arg0, arg1) {
|
|
@@ -3582,7 +3582,7 @@ function __wbg_get_imports() {
|
|
|
3582
3582
|
return ret;
|
|
3583
3583
|
};
|
|
3584
3584
|
imports.wbg.__wbindgen_cast_9b175b9f4d06c9c3 = function(arg0, arg1) {
|
|
3585
|
-
const ret = makeMutClosure(arg0, arg1, 1020,
|
|
3585
|
+
const ret = makeMutClosure(arg0, arg1, 1020, __wbg_adapter_10);
|
|
3586
3586
|
return ret;
|
|
3587
3587
|
};
|
|
3588
3588
|
imports.wbg.__wbindgen_cast_b77aa29fa8fe8560 = function(arg0, arg1) {
|
|
@@ -3649,6 +3649,12 @@ function safeBigintToNumber(x) {
|
|
|
3649
3649
|
}
|
|
3650
3650
|
return new Number(x).valueOf();
|
|
3651
3651
|
}
|
|
3652
|
+
function safeBigIntOrUndefinedToNumberOrUndefined(x) {
|
|
3653
|
+
if (x === undefined || x === null) {
|
|
3654
|
+
return;
|
|
3655
|
+
}
|
|
3656
|
+
return safeBigintToNumber(x);
|
|
3657
|
+
}
|
|
3652
3658
|
|
|
3653
3659
|
// src/CoreCryptoMLS.ts
|
|
3654
3660
|
function commitBundleFromFfi(commitBundle) {
|
|
@@ -3673,7 +3679,7 @@ function bufferedDecryptedMessageFromFfi(m) {
|
|
|
3673
3679
|
return {
|
|
3674
3680
|
message: m.message,
|
|
3675
3681
|
isActive: m.isActive,
|
|
3676
|
-
commitDelay:
|
|
3682
|
+
commitDelay: safeBigIntOrUndefinedToNumberOrUndefined(m.commitDelay),
|
|
3677
3683
|
senderClientId: m.senderClientId,
|
|
3678
3684
|
hasEpochChanged: m.hasEpochChanged,
|
|
3679
3685
|
identity: m.identity,
|
|
@@ -3721,7 +3727,7 @@ function mlsTransportToFfi(mlsTransport) {
|
|
|
3721
3727
|
function crlRegistrationFromFfi(r) {
|
|
3722
3728
|
return {
|
|
3723
3729
|
dirty: r.dirty,
|
|
3724
|
-
expiration:
|
|
3730
|
+
expiration: safeBigIntOrUndefinedToNumberOrUndefined(r.expiration)
|
|
3725
3731
|
};
|
|
3726
3732
|
}
|
|
3727
3733
|
function normalizeEnum(enumType, value) {
|