@wireapp/core-crypto 3.1.0 → 3.1.1
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
@@ -1,14 +1,14 @@
|
|
1
1
|
{
|
2
2
|
"name": "@wireapp/core-crypto",
|
3
|
-
"version": "3.1.
|
3
|
+
"version": "3.1.1",
|
4
4
|
"description": "CoreCrypto bindings for the Web",
|
5
5
|
"type": "module",
|
6
6
|
"module": "platforms/web/corecrypto.js",
|
7
7
|
"types": "platforms/web/corecrypto.d.ts",
|
8
8
|
"scripts": {
|
9
9
|
"clean": "rm -f ./platforms/web/*.{js,ts,wasm,html} && rm -rf ./platforms/web/assets",
|
10
|
-
"test": "[ \"$(basename $PWD)\" != \"crypto-ffi\" ] && echo \"Error: Not in crypto-ffi directory, do:\" && echo cd crypto-ffi && exit 1 || bun run build_ts.ts && wdio run bindings/js/wdio.conf.ts --spec bindings/js/test
|
11
|
-
"bench": "[ \"$(basename $PWD)\" != \"crypto-ffi\" ] && echo \"Error: Not in crypto-ffi directory, do:\" && echo cd crypto-ffi && exit 1 ||bun run build_ts.ts && wdio run bindings/js/wdio.conf.ts --spec bindings/js/benches
|
10
|
+
"test": "[ \"$(basename $PWD)\" != \"crypto-ffi\" ] && echo \"Error: Not in crypto-ffi directory, do:\" && echo cd crypto-ffi && exit 1 || bun run build_ts.ts && wdio run bindings/js/wdio.conf.ts --spec bindings/js/test/*.test.ts",
|
11
|
+
"bench": "[ \"$(basename $PWD)\" != \"crypto-ffi\" ] && echo \"Error: Not in crypto-ffi directory, do:\" && echo cd crypto-ffi && exit 1 ||bun run build_ts.ts && wdio run bindings/js/wdio.conf.ts --spec bindings/js/benches/*.bench.ts --log-level warn"
|
12
12
|
},
|
13
13
|
"publishConfig": {
|
14
14
|
"access": "public"
|
Binary file
|
@@ -13,6 +13,14 @@ var takeObject = function(idx) {
|
|
13
13
|
dropObject(idx);
|
14
14
|
return ret;
|
15
15
|
};
|
16
|
+
var addHeapObject = function(obj) {
|
17
|
+
if (heap_next === heap.length)
|
18
|
+
heap.push(heap.length + 1);
|
19
|
+
const idx = heap_next;
|
20
|
+
heap_next = heap[idx];
|
21
|
+
heap[idx] = obj;
|
22
|
+
return idx;
|
23
|
+
};
|
16
24
|
var getUint8ArrayMemory0 = function() {
|
17
25
|
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
18
26
|
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
@@ -23,14 +31,6 @@ var getStringFromWasm0 = function(ptr, len) {
|
|
23
31
|
ptr = ptr >>> 0;
|
24
32
|
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
25
33
|
};
|
26
|
-
var addHeapObject = function(obj) {
|
27
|
-
if (heap_next === heap.length)
|
28
|
-
heap.push(heap.length + 1);
|
29
|
-
const idx = heap_next;
|
30
|
-
heap_next = heap[idx];
|
31
|
-
heap[idx] = obj;
|
32
|
-
return idx;
|
33
|
-
};
|
34
34
|
var passStringToWasm0 = function(arg, malloc, realloc) {
|
35
35
|
if (realloc === undefined) {
|
36
36
|
const buf = cachedTextEncoder.encode(arg);
|
@@ -152,13 +152,13 @@ var makeMutClosure = function(arg0, arg1, dtor, f) {
|
|
152
152
|
return real;
|
153
153
|
};
|
154
154
|
var __wbg_adapter_54 = function(arg0, arg1, arg2) {
|
155
|
-
wasm.
|
155
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h19c41621fd130a07(arg0, arg1, addHeapObject(arg2));
|
156
156
|
};
|
157
157
|
var __wbg_adapter_57 = function(arg0, arg1, arg2) {
|
158
|
-
wasm.
|
158
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h83f1f35eeee33846(arg0, arg1, addHeapObject(arg2));
|
159
159
|
};
|
160
160
|
var __wbg_adapter_60 = function(arg0, arg1, arg2) {
|
161
|
-
wasm.
|
161
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h84d372f0b91a205d(arg0, arg1, addHeapObject(arg2));
|
162
162
|
};
|
163
163
|
var getArrayJsValueFromWasm0 = function(ptr, len) {
|
164
164
|
ptr = ptr >>> 0;
|
@@ -209,8 +209,8 @@ var handleError = function(f, args) {
|
|
209
209
|
wasm.__wbindgen_exn_store(addHeapObject(e));
|
210
210
|
}
|
211
211
|
};
|
212
|
-
var
|
213
|
-
wasm.
|
212
|
+
var __wbg_adapter_514 = function(arg0, arg1, arg2, arg3) {
|
213
|
+
wasm.wasm_bindgen__convert__closures__invoke2_mut__h00f8b7a5523a4e75(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
214
214
|
};
|
215
215
|
async function __wbg_load(module, imports) {
|
216
216
|
if (typeof Response === "function" && module instanceof Response) {
|
@@ -242,16 +242,16 @@ var __wbg_get_imports = function() {
|
|
242
242
|
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
243
243
|
takeObject(arg0);
|
244
244
|
};
|
245
|
-
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
246
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
247
|
-
return addHeapObject(ret);
|
248
|
-
};
|
249
245
|
imports.wbg.__wbindgen_number_new = function(arg0) {
|
250
246
|
const ret = arg0;
|
251
247
|
return addHeapObject(ret);
|
252
248
|
};
|
253
|
-
imports.wbg.
|
254
|
-
const ret =
|
249
|
+
imports.wbg.__wbg_newacmeauthz_new = function(arg0) {
|
250
|
+
const ret = NewAcmeAuthz.__wrap(arg0);
|
251
|
+
return addHeapObject(ret);
|
252
|
+
};
|
253
|
+
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
254
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
255
255
|
return addHeapObject(ret);
|
256
256
|
};
|
257
257
|
imports.wbg.__wbg_ffiwiree2eidentity_new = function(arg0) {
|
@@ -270,11 +270,11 @@ var __wbg_get_imports = function() {
|
|
270
270
|
const ret = BigInt.asUintN(64, arg0);
|
271
271
|
return addHeapObject(ret);
|
272
272
|
};
|
273
|
-
imports.wbg.
|
274
|
-
const ret =
|
273
|
+
imports.wbg.__wbg_acmedirectory_new = function(arg0) {
|
274
|
+
const ret = AcmeDirectory.__wrap(arg0);
|
275
275
|
return addHeapObject(ret);
|
276
276
|
};
|
277
|
-
imports.wbg.
|
277
|
+
imports.wbg.__wbg_execute_b4b48eb9f64d3255 = function() {
|
278
278
|
return handleError(function(arg0, arg1) {
|
279
279
|
const ret = getObject(arg0).execute(CoreCryptoContext.__wrap(arg1));
|
280
280
|
return addHeapObject(ret);
|
@@ -288,14 +288,14 @@ var __wbg_get_imports = function() {
|
|
288
288
|
const ret = CommitBundle.__wrap(arg0);
|
289
289
|
return addHeapObject(ret);
|
290
290
|
};
|
291
|
-
imports.wbg.__wbg_corecrypto_new = function(arg0) {
|
292
|
-
const ret = CoreCrypto.__wrap(arg0);
|
293
|
-
return addHeapObject(ret);
|
294
|
-
};
|
295
291
|
imports.wbg.__wbg_proposalbundle_new = function(arg0) {
|
296
292
|
const ret = ProposalBundle.__wrap(arg0);
|
297
293
|
return addHeapObject(ret);
|
298
294
|
};
|
295
|
+
imports.wbg.__wbg_corecrypto_new = function(arg0) {
|
296
|
+
const ret = CoreCrypto.__wrap(arg0);
|
297
|
+
return addHeapObject(ret);
|
298
|
+
};
|
299
299
|
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
|
300
300
|
const ret = getObject(arg0);
|
301
301
|
return addHeapObject(ret);
|
@@ -364,6 +364,11 @@ var __wbg_get_imports = function() {
|
|
364
364
|
imports.wbg.__wbg_queueMicrotask_12a30234db4045d3 = function(arg0) {
|
365
365
|
queueMicrotask(getObject(arg0));
|
366
366
|
};
|
367
|
+
imports.wbg.__wbg_getRandomValues_d9ee19ffb7278e97 = function() {
|
368
|
+
return handleError(function(arg0, arg1) {
|
369
|
+
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
370
|
+
}, arguments);
|
371
|
+
};
|
367
372
|
imports.wbg.__wbg_now_1be9a41d0832ae2d = function() {
|
368
373
|
const ret = Date.now();
|
369
374
|
return ret;
|
@@ -428,14 +433,14 @@ var __wbg_get_imports = function() {
|
|
428
433
|
const ret = getObject(arg0).msCrypto;
|
429
434
|
return addHeapObject(ret);
|
430
435
|
};
|
431
|
-
imports.wbg.
|
436
|
+
imports.wbg.__wbg_randomFillSync_5c9c955aa56b6049 = function() {
|
432
437
|
return handleError(function(arg0, arg1) {
|
433
|
-
getObject(arg0).
|
438
|
+
getObject(arg0).randomFillSync(takeObject(arg1));
|
434
439
|
}, arguments);
|
435
440
|
};
|
436
|
-
imports.wbg.
|
441
|
+
imports.wbg.__wbg_getRandomValues_3aa56aa6edec874c = function() {
|
437
442
|
return handleError(function(arg0, arg1) {
|
438
|
-
getObject(arg0).
|
443
|
+
getObject(arg0).getRandomValues(getObject(arg1));
|
439
444
|
}, arguments);
|
440
445
|
};
|
441
446
|
imports.wbg.__wbg_setmultientry_a4c0f50fb1bb8977 = function(arg0, arg1) {
|
@@ -963,7 +968,7 @@ var __wbg_get_imports = function() {
|
|
963
968
|
const a = state0.a;
|
964
969
|
state0.a = 0;
|
965
970
|
try {
|
966
|
-
return
|
971
|
+
return __wbg_adapter_514(a, state0.b, arg02, arg12);
|
967
972
|
} finally {
|
968
973
|
state0.a = a;
|
969
974
|
}
|
@@ -1049,16 +1054,16 @@ var __wbg_get_imports = function() {
|
|
1049
1054
|
const ret = v0;
|
1050
1055
|
return addHeapObject(ret);
|
1051
1056
|
};
|
1052
|
-
imports.wbg.
|
1057
|
+
imports.wbg.__wbindgen_closure_wrapper3748 = function(arg0, arg1, arg2) {
|
1053
1058
|
const ret = makeMutClosure(arg0, arg1, 901, __wbg_adapter_54);
|
1054
1059
|
return addHeapObject(ret);
|
1055
1060
|
};
|
1056
|
-
imports.wbg.
|
1057
|
-
const ret = makeMutClosure(arg0, arg1,
|
1061
|
+
imports.wbg.__wbindgen_closure_wrapper13454 = function(arg0, arg1, arg2) {
|
1062
|
+
const ret = makeMutClosure(arg0, arg1, 2167, __wbg_adapter_57);
|
1058
1063
|
return addHeapObject(ret);
|
1059
1064
|
};
|
1060
|
-
imports.wbg.
|
1061
|
-
const ret = makeMutClosure(arg0, arg1,
|
1065
|
+
imports.wbg.__wbindgen_closure_wrapper15462 = function(arg0, arg1, arg2) {
|
1066
|
+
const ret = makeMutClosure(arg0, arg1, 2399, __wbg_adapter_60);
|
1062
1067
|
return addHeapObject(ret);
|
1063
1068
|
};
|
1064
1069
|
return imports;
|
@@ -1129,6 +1134,14 @@ var WirePolicy = Object.freeze({
|
|
1129
1134
|
Ciphertext: 2,
|
1130
1135
|
"2": "Ciphertext"
|
1131
1136
|
});
|
1137
|
+
var DeviceStatus = Object.freeze({
|
1138
|
+
Valid: 1,
|
1139
|
+
"1": "Valid",
|
1140
|
+
Expired: 2,
|
1141
|
+
"2": "Expired",
|
1142
|
+
Revoked: 3,
|
1143
|
+
"3": "Revoked"
|
1144
|
+
});
|
1132
1145
|
var Ciphersuite = Object.freeze({
|
1133
1146
|
MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519: 1,
|
1134
1147
|
"1": "MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519",
|
@@ -1146,14 +1159,6 @@ var Ciphersuite = Object.freeze({
|
|
1146
1159
|
"7": "MLS_256_DHKEMP384_AES256GCM_SHA384_P384"
|
1147
1160
|
});
|
1148
1161
|
var CoreCryptoLogLevel = Object.freeze({ Off: 1, "1": "Off", Trace: 2, "2": "Trace", Debug: 3, "3": "Debug", Info: 4, "4": "Info", Warn: 5, "5": "Warn", Error: 6, "6": "Error" });
|
1149
|
-
var DeviceStatus = Object.freeze({
|
1150
|
-
Valid: 1,
|
1151
|
-
"1": "Valid",
|
1152
|
-
Expired: 2,
|
1153
|
-
"2": "Expired",
|
1154
|
-
Revoked: 3,
|
1155
|
-
"3": "Revoked"
|
1156
|
-
});
|
1157
1162
|
var CredentialType = Object.freeze({
|
1158
1163
|
Basic: 1,
|
1159
1164
|
"1": "Basic",
|