@bitwarden/commercial-sdk-internal 0.2.0-main.396 → 0.2.0-main.398
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/bitwarden_wasm_internal.d.ts +8 -0
- package/bitwarden_wasm_internal_bg.js +91 -58
- package/bitwarden_wasm_internal_bg.wasm +0 -0
- package/bitwarden_wasm_internal_bg.wasm.d.ts +15 -8
- package/bitwarden_wasm_internal_bg.wasm.js +1 -1
- package/node/bitwarden_wasm_internal.d.ts +8 -0
- package/node/bitwarden_wasm_internal.js +83 -50
- package/node/bitwarden_wasm_internal_bg.wasm +0 -0
- package/node/bitwarden_wasm_internal_bg.wasm.d.ts +13 -6
- package/package.json +1 -1
|
@@ -2444,6 +2444,14 @@ export class PureCrypto {
|
|
|
2444
2444
|
encrypted_user_key: string,
|
|
2445
2445
|
master_key: Uint8Array,
|
|
2446
2446
|
): Uint8Array;
|
|
2447
|
+
/**
|
|
2448
|
+
* Given an encrypted private RSA key and the symmetric key it is wrapped with, this returns
|
|
2449
|
+
* the corresponding public RSA key in DER format.
|
|
2450
|
+
*/
|
|
2451
|
+
static rsa_extract_public_key(
|
|
2452
|
+
encrypted_private_key: string,
|
|
2453
|
+
wrapping_key: Uint8Array,
|
|
2454
|
+
): Uint8Array;
|
|
2447
2455
|
}
|
|
2448
2456
|
/**
|
|
2449
2457
|
* The `SendAccessClient` is used to interact with the Bitwarden API to get send access tokens.
|
|
@@ -868,6 +868,18 @@ export function isEncryptFileError(error) {
|
|
|
868
868
|
}
|
|
869
869
|
}
|
|
870
870
|
|
|
871
|
+
function wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e(arg0, arg1) {
|
|
872
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e(arg0, arg1);
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
function wasm_bindgen__convert__closures_____invoke__hb0cefc4a47b27ccb(arg0, arg1, arg2) {
|
|
876
|
+
wasm.wasm_bindgen__convert__closures_____invoke__hb0cefc4a47b27ccb(
|
|
877
|
+
arg0,
|
|
878
|
+
arg1,
|
|
879
|
+
addHeapObject(arg2),
|
|
880
|
+
);
|
|
881
|
+
}
|
|
882
|
+
|
|
871
883
|
function wasm_bindgen__convert__closures_____invoke__h59c036539ecefa06(arg0, arg1, arg2) {
|
|
872
884
|
try {
|
|
873
885
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
@@ -887,18 +899,6 @@ function wasm_bindgen__convert__closures_____invoke__h59c036539ecefa06(arg0, arg
|
|
|
887
899
|
}
|
|
888
900
|
}
|
|
889
901
|
|
|
890
|
-
function wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e(arg0, arg1) {
|
|
891
|
-
wasm.wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e(arg0, arg1);
|
|
892
|
-
}
|
|
893
|
-
|
|
894
|
-
function wasm_bindgen__convert__closures_____invoke__hb0cefc4a47b27ccb(arg0, arg1, arg2) {
|
|
895
|
-
wasm.wasm_bindgen__convert__closures_____invoke__hb0cefc4a47b27ccb(
|
|
896
|
-
arg0,
|
|
897
|
-
arg1,
|
|
898
|
-
addHeapObject(arg2),
|
|
899
|
-
);
|
|
900
|
-
}
|
|
901
|
-
|
|
902
902
|
function wasm_bindgen__convert__closures_____invoke__h43dfd80678632d6f(arg0, arg1, arg2, arg3) {
|
|
903
903
|
wasm.wasm_bindgen__convert__closures_____invoke__h43dfd80678632d6f(
|
|
904
904
|
arg0,
|
|
@@ -4090,6 +4090,39 @@ export class PureCrypto {
|
|
|
4090
4090
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
4091
4091
|
}
|
|
4092
4092
|
}
|
|
4093
|
+
/**
|
|
4094
|
+
* Given an encrypted private RSA key and the symmetric key it is wrapped with, this returns
|
|
4095
|
+
* the corresponding public RSA key in DER format.
|
|
4096
|
+
* @param {string} encrypted_private_key
|
|
4097
|
+
* @param {Uint8Array} wrapping_key
|
|
4098
|
+
* @returns {Uint8Array}
|
|
4099
|
+
*/
|
|
4100
|
+
static rsa_extract_public_key(encrypted_private_key, wrapping_key) {
|
|
4101
|
+
try {
|
|
4102
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
4103
|
+
const ptr0 = passStringToWasm0(
|
|
4104
|
+
encrypted_private_key,
|
|
4105
|
+
wasm.__wbindgen_malloc,
|
|
4106
|
+
wasm.__wbindgen_realloc,
|
|
4107
|
+
);
|
|
4108
|
+
const len0 = WASM_VECTOR_LEN;
|
|
4109
|
+
const ptr1 = passArray8ToWasm0(wrapping_key, wasm.__wbindgen_malloc);
|
|
4110
|
+
const len1 = WASM_VECTOR_LEN;
|
|
4111
|
+
wasm.purecrypto_rsa_extract_public_key(retptr, ptr0, len0, ptr1, len1);
|
|
4112
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
4113
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
4114
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
4115
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
4116
|
+
if (r3) {
|
|
4117
|
+
throw takeObject(r2);
|
|
4118
|
+
}
|
|
4119
|
+
var v3 = getArrayU8FromWasm0(r0, r1).slice();
|
|
4120
|
+
wasm.__wbindgen_free(r0, r1 * 1, 1);
|
|
4121
|
+
return v3;
|
|
4122
|
+
} finally {
|
|
4123
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
4124
|
+
}
|
|
4125
|
+
}
|
|
4093
4126
|
}
|
|
4094
4127
|
if (Symbol.dispose) PureCrypto.prototype[Symbol.dispose] = PureCrypto.prototype.free;
|
|
4095
4128
|
|
|
@@ -4507,7 +4540,7 @@ export function __wbg_call_e762c39fa8ea36bf() {
|
|
|
4507
4540
|
}, arguments);
|
|
4508
4541
|
}
|
|
4509
4542
|
|
|
4510
|
-
export function
|
|
4543
|
+
export function __wbg_cipher_27b0aefec8023efb(arg0) {
|
|
4511
4544
|
const ret = getObject(arg0).cipher;
|
|
4512
4545
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
4513
4546
|
}
|
|
@@ -4600,7 +4633,7 @@ export function __wbg_fetch_f8ba0e29a9d6de0d(arg0, arg1) {
|
|
|
4600
4633
|
return addHeapObject(ret);
|
|
4601
4634
|
}
|
|
4602
4635
|
|
|
4603
|
-
export function
|
|
4636
|
+
export function __wbg_folder_d6a2d6a9d32f3686(arg0) {
|
|
4604
4637
|
const ret = getObject(arg0).folder;
|
|
4605
4638
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
4606
4639
|
}
|
|
@@ -4627,7 +4660,7 @@ export function __wbg_getTime_14776bfb48a1bff9(arg0) {
|
|
|
4627
4660
|
return ret;
|
|
4628
4661
|
}
|
|
4629
4662
|
|
|
4630
|
-
export function
|
|
4663
|
+
export function __wbg_get_70485431d7544ae5() {
|
|
4631
4664
|
return handleError(function (arg0, arg1, arg2) {
|
|
4632
4665
|
let deferred0_0;
|
|
4633
4666
|
let deferred0_1;
|
|
@@ -4647,19 +4680,12 @@ export function __wbg_get_7bed016f185add81(arg0, arg1) {
|
|
|
4647
4680
|
return addHeapObject(ret);
|
|
4648
4681
|
}
|
|
4649
4682
|
|
|
4650
|
-
export function
|
|
4683
|
+
export function __wbg_get_access_token_048717a0999058da(arg0) {
|
|
4651
4684
|
const ret = getObject(arg0).get_access_token();
|
|
4652
4685
|
return addHeapObject(ret);
|
|
4653
4686
|
}
|
|
4654
4687
|
|
|
4655
|
-
export function
|
|
4656
|
-
return handleError(function (arg0, arg1) {
|
|
4657
|
-
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
4658
|
-
return addHeapObject(ret);
|
|
4659
|
-
}, arguments);
|
|
4660
|
-
}
|
|
4661
|
-
|
|
4662
|
-
export function __wbg_get_f97d1609fe1ef27f() {
|
|
4688
|
+
export function __wbg_get_bd5598ce2fa61fe7() {
|
|
4663
4689
|
return handleError(function (arg0, arg1, arg2) {
|
|
4664
4690
|
let deferred0_0;
|
|
4665
4691
|
let deferred0_1;
|
|
@@ -4674,6 +4700,13 @@ export function __wbg_get_f97d1609fe1ef27f() {
|
|
|
4674
4700
|
}, arguments);
|
|
4675
4701
|
}
|
|
4676
4702
|
|
|
4703
|
+
export function __wbg_get_efcb449f58ec27c2() {
|
|
4704
|
+
return handleError(function (arg0, arg1) {
|
|
4705
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
4706
|
+
return addHeapObject(ret);
|
|
4707
|
+
}, arguments);
|
|
4708
|
+
}
|
|
4709
|
+
|
|
4677
4710
|
export function __wbg_get_with_ref_key_1dc361bd10053bfe(arg0, arg1) {
|
|
4678
4711
|
const ret = getObject(arg0)[getObject(arg1)];
|
|
4679
4712
|
return addHeapObject(ret);
|
|
@@ -4858,14 +4891,14 @@ export function __wbg_length_cdd215e10d9dd507(arg0) {
|
|
|
4858
4891
|
return ret;
|
|
4859
4892
|
}
|
|
4860
4893
|
|
|
4861
|
-
export function
|
|
4894
|
+
export function __wbg_list_4789a1cc32867476() {
|
|
4862
4895
|
return handleError(function (arg0) {
|
|
4863
4896
|
const ret = getObject(arg0).list();
|
|
4864
4897
|
return addHeapObject(ret);
|
|
4865
4898
|
}, arguments);
|
|
4866
4899
|
}
|
|
4867
4900
|
|
|
4868
|
-
export function
|
|
4901
|
+
export function __wbg_list_65a7f325af23cc73() {
|
|
4869
4902
|
return handleError(function (arg0) {
|
|
4870
4903
|
const ret = getObject(arg0).list();
|
|
4871
4904
|
return addHeapObject(ret);
|
|
@@ -5109,7 +5142,7 @@ export function __wbg_randomFillSync_ac0988aba3254290() {
|
|
|
5109
5142
|
}, arguments);
|
|
5110
5143
|
}
|
|
5111
5144
|
|
|
5112
|
-
export function
|
|
5145
|
+
export function __wbg_remove_0825e8a0ec895d58() {
|
|
5113
5146
|
return handleError(function (arg0, arg1, arg2) {
|
|
5114
5147
|
let deferred0_0;
|
|
5115
5148
|
let deferred0_1;
|
|
@@ -5124,7 +5157,7 @@ export function __wbg_remove_3594f15e8fca4743() {
|
|
|
5124
5157
|
}, arguments);
|
|
5125
5158
|
}
|
|
5126
5159
|
|
|
5127
|
-
export function
|
|
5160
|
+
export function __wbg_remove_ce09ed4fa7b19fbf() {
|
|
5128
5161
|
return handleError(function (arg0, arg1, arg2) {
|
|
5129
5162
|
let deferred0_0;
|
|
5130
5163
|
let deferred0_1;
|
|
@@ -5170,40 +5203,10 @@ export function __wbg_setTimeout_ca12ead8b48245e2(arg0, arg1) {
|
|
|
5170
5203
|
return addHeapObject(ret);
|
|
5171
5204
|
}
|
|
5172
5205
|
|
|
5173
|
-
export function __wbg_set_0159738cb1dd7a1d() {
|
|
5174
|
-
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
5175
|
-
let deferred0_0;
|
|
5176
|
-
let deferred0_1;
|
|
5177
|
-
try {
|
|
5178
|
-
deferred0_0 = arg1;
|
|
5179
|
-
deferred0_1 = arg2;
|
|
5180
|
-
const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
|
|
5181
|
-
return addHeapObject(ret);
|
|
5182
|
-
} finally {
|
|
5183
|
-
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
5184
|
-
}
|
|
5185
|
-
}, arguments);
|
|
5186
|
-
}
|
|
5187
|
-
|
|
5188
5206
|
export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
|
|
5189
5207
|
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
5190
5208
|
}
|
|
5191
5209
|
|
|
5192
|
-
export function __wbg_set_834a40164c1f126c() {
|
|
5193
|
-
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
5194
|
-
let deferred0_0;
|
|
5195
|
-
let deferred0_1;
|
|
5196
|
-
try {
|
|
5197
|
-
deferred0_0 = arg1;
|
|
5198
|
-
deferred0_1 = arg2;
|
|
5199
|
-
const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
|
|
5200
|
-
return addHeapObject(ret);
|
|
5201
|
-
} finally {
|
|
5202
|
-
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
5203
|
-
}
|
|
5204
|
-
}, arguments);
|
|
5205
|
-
}
|
|
5206
|
-
|
|
5207
5210
|
export function __wbg_set_907fb406c34a251d(arg0, arg1, arg2) {
|
|
5208
5211
|
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
|
5209
5212
|
return addHeapObject(ret);
|
|
@@ -5228,6 +5231,36 @@ export function __wbg_set_credentials_f621cd2d85c0c228(arg0, arg1) {
|
|
|
5228
5231
|
getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
5229
5232
|
}
|
|
5230
5233
|
|
|
5234
|
+
export function __wbg_set_e12e8ea9f0a95d29() {
|
|
5235
|
+
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
5236
|
+
let deferred0_0;
|
|
5237
|
+
let deferred0_1;
|
|
5238
|
+
try {
|
|
5239
|
+
deferred0_0 = arg1;
|
|
5240
|
+
deferred0_1 = arg2;
|
|
5241
|
+
const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
|
|
5242
|
+
return addHeapObject(ret);
|
|
5243
|
+
} finally {
|
|
5244
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
5245
|
+
}
|
|
5246
|
+
}, arguments);
|
|
5247
|
+
}
|
|
5248
|
+
|
|
5249
|
+
export function __wbg_set_e4af713e5ff898d5() {
|
|
5250
|
+
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
5251
|
+
let deferred0_0;
|
|
5252
|
+
let deferred0_1;
|
|
5253
|
+
try {
|
|
5254
|
+
deferred0_0 = arg1;
|
|
5255
|
+
deferred0_1 = arg2;
|
|
5256
|
+
const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
|
|
5257
|
+
return addHeapObject(ret);
|
|
5258
|
+
} finally {
|
|
5259
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
5260
|
+
}
|
|
5261
|
+
}, arguments);
|
|
5262
|
+
}
|
|
5263
|
+
|
|
5231
5264
|
export function __wbg_set_headers_6926da238cd32ee4(arg0, arg1) {
|
|
5232
5265
|
getObject(arg0).headers = getObject(arg1);
|
|
5233
5266
|
}
|
|
Binary file
|
|
@@ -178,6 +178,13 @@ export const purecrypto_decrypt_user_key_with_master_key: (
|
|
|
178
178
|
d: number,
|
|
179
179
|
e: number,
|
|
180
180
|
) => void;
|
|
181
|
+
export const purecrypto_rsa_extract_public_key: (
|
|
182
|
+
a: number,
|
|
183
|
+
b: number,
|
|
184
|
+
c: number,
|
|
185
|
+
d: number,
|
|
186
|
+
e: number,
|
|
187
|
+
) => void;
|
|
181
188
|
export const generate_ssh_key: (a: number, b: number) => void;
|
|
182
189
|
export const import_ssh_key: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
183
190
|
export const isTestError: (a: number) => number;
|
|
@@ -435,24 +442,24 @@ export const __wbg_totpclient_free: (a: number, b: number) => void;
|
|
|
435
442
|
export const __wbg_get_outgoingmessage_destination: (a: number) => number;
|
|
436
443
|
export const __wbg_set_outgoingmessage_destination: (a: number, b: number) => void;
|
|
437
444
|
export const __wbg_cryptoclient_free: (a: number, b: number) => void;
|
|
438
|
-
export const wasm_bindgen__convert__closures_____invoke__h59c036539ecefa06: (
|
|
439
|
-
a: number,
|
|
440
|
-
b: number,
|
|
441
|
-
c: number,
|
|
442
|
-
d: number,
|
|
443
|
-
) => void;
|
|
444
|
-
export const wasm_bindgen__closure__destroy__hd2baf0154e030ab9: (a: number, b: number) => void;
|
|
445
445
|
export const wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e: (
|
|
446
446
|
a: number,
|
|
447
447
|
b: number,
|
|
448
448
|
) => void;
|
|
449
449
|
export const wasm_bindgen__closure__destroy__h5bf455f3385c4f71: (a: number, b: number) => void;
|
|
450
|
+
export const wasm_bindgen__closure__destroy__hfcb631b72e5e985c: (a: number, b: number) => void;
|
|
450
451
|
export const wasm_bindgen__convert__closures_____invoke__hb0cefc4a47b27ccb: (
|
|
451
452
|
a: number,
|
|
452
453
|
b: number,
|
|
453
454
|
c: number,
|
|
454
455
|
) => void;
|
|
455
|
-
export const
|
|
456
|
+
export const wasm_bindgen__closure__destroy__hd2baf0154e030ab9: (a: number, b: number) => void;
|
|
457
|
+
export const wasm_bindgen__convert__closures_____invoke__h59c036539ecefa06: (
|
|
458
|
+
a: number,
|
|
459
|
+
b: number,
|
|
460
|
+
c: number,
|
|
461
|
+
d: number,
|
|
462
|
+
) => void;
|
|
456
463
|
export const wasm_bindgen__convert__closures_____invoke__h43dfd80678632d6f: (
|
|
457
464
|
a: number,
|
|
458
465
|
b: number,
|