@bitwarden/commercial-sdk-internal 0.2.0-main.397 → 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 +79 -46
- package/bitwarden_wasm_internal_bg.wasm +0 -0
- package/bitwarden_wasm_internal_bg.wasm.d.ts +13 -6
- package/bitwarden_wasm_internal_bg.wasm.js +1 -1
- package/node/bitwarden_wasm_internal.d.ts +8 -0
- package/node/bitwarden_wasm_internal.js +79 -46
- 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,10 @@ 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
|
+
|
|
871
875
|
function wasm_bindgen__convert__closures_____invoke__hb0cefc4a47b27ccb(arg0, arg1, arg2) {
|
|
872
876
|
wasm.wasm_bindgen__convert__closures_____invoke__hb0cefc4a47b27ccb(
|
|
873
877
|
arg0,
|
|
@@ -895,10 +899,6 @@ function wasm_bindgen__convert__closures_____invoke__h59c036539ecefa06(arg0, arg
|
|
|
895
899
|
}
|
|
896
900
|
}
|
|
897
901
|
|
|
898
|
-
function wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e(arg0, arg1) {
|
|
899
|
-
wasm.wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e(arg0, arg1);
|
|
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_f836288e48750d27() {
|
|
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_f836288e48750d27() {
|
|
|
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_6e0b8907d2143b2a() {
|
|
|
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;
|
|
@@ -5174,7 +5207,31 @@ export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
|
|
|
5174
5207
|
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
5175
5208
|
}
|
|
5176
5209
|
|
|
5177
|
-
export function
|
|
5210
|
+
export function __wbg_set_907fb406c34a251d(arg0, arg1, arg2) {
|
|
5211
|
+
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
|
5212
|
+
return addHeapObject(ret);
|
|
5213
|
+
}
|
|
5214
|
+
|
|
5215
|
+
export function __wbg_set_body_3c365989753d61f4(arg0, arg1) {
|
|
5216
|
+
getObject(arg0).body = getObject(arg1);
|
|
5217
|
+
}
|
|
5218
|
+
|
|
5219
|
+
export function __wbg_set_c213c871859d6500(arg0, arg1, arg2) {
|
|
5220
|
+
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
5221
|
+
}
|
|
5222
|
+
|
|
5223
|
+
export function __wbg_set_c2abbebe8b9ebee1() {
|
|
5224
|
+
return handleError(function (arg0, arg1, arg2) {
|
|
5225
|
+
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
5226
|
+
return ret;
|
|
5227
|
+
}, arguments);
|
|
5228
|
+
}
|
|
5229
|
+
|
|
5230
|
+
export function __wbg_set_credentials_f621cd2d85c0c228(arg0, arg1) {
|
|
5231
|
+
getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
5232
|
+
}
|
|
5233
|
+
|
|
5234
|
+
export function __wbg_set_e12e8ea9f0a95d29() {
|
|
5178
5235
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
5179
5236
|
let deferred0_0;
|
|
5180
5237
|
let deferred0_1;
|
|
@@ -5189,7 +5246,7 @@ export function __wbg_set_4f10240cec7c0329() {
|
|
|
5189
5246
|
}, arguments);
|
|
5190
5247
|
}
|
|
5191
5248
|
|
|
5192
|
-
export function
|
|
5249
|
+
export function __wbg_set_e4af713e5ff898d5() {
|
|
5193
5250
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
5194
5251
|
let deferred0_0;
|
|
5195
5252
|
let deferred0_1;
|
|
@@ -5204,30 +5261,6 @@ export function __wbg_set_8bf42eeed138232a() {
|
|
|
5204
5261
|
}, arguments);
|
|
5205
5262
|
}
|
|
5206
5263
|
|
|
5207
|
-
export function __wbg_set_907fb406c34a251d(arg0, arg1, arg2) {
|
|
5208
|
-
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
|
5209
|
-
return addHeapObject(ret);
|
|
5210
|
-
}
|
|
5211
|
-
|
|
5212
|
-
export function __wbg_set_body_3c365989753d61f4(arg0, arg1) {
|
|
5213
|
-
getObject(arg0).body = getObject(arg1);
|
|
5214
|
-
}
|
|
5215
|
-
|
|
5216
|
-
export function __wbg_set_c213c871859d6500(arg0, arg1, arg2) {
|
|
5217
|
-
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
5218
|
-
}
|
|
5219
|
-
|
|
5220
|
-
export function __wbg_set_c2abbebe8b9ebee1() {
|
|
5221
|
-
return handleError(function (arg0, arg1, arg2) {
|
|
5222
|
-
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
5223
|
-
return ret;
|
|
5224
|
-
}, arguments);
|
|
5225
|
-
}
|
|
5226
|
-
|
|
5227
|
-
export function __wbg_set_credentials_f621cd2d85c0c228(arg0, arg1) {
|
|
5228
|
-
getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
5229
|
-
}
|
|
5230
|
-
|
|
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,6 +442,12 @@ 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;
|
|
445
|
+
export const wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e: (
|
|
446
|
+
a: number,
|
|
447
|
+
b: number,
|
|
448
|
+
) => void;
|
|
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;
|
|
438
451
|
export const wasm_bindgen__convert__closures_____invoke__hb0cefc4a47b27ccb: (
|
|
439
452
|
a: number,
|
|
440
453
|
b: number,
|
|
@@ -447,12 +460,6 @@ export const wasm_bindgen__convert__closures_____invoke__h59c036539ecefa06: (
|
|
|
447
460
|
c: number,
|
|
448
461
|
d: number,
|
|
449
462
|
) => void;
|
|
450
|
-
export const wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e: (
|
|
451
|
-
a: number,
|
|
452
|
-
b: number,
|
|
453
|
-
) => void;
|
|
454
|
-
export const wasm_bindgen__closure__destroy__h5bf455f3385c4f71: (a: number, b: number) => void;
|
|
455
|
-
export const wasm_bindgen__closure__destroy__hfcb631b72e5e985c: (a: number, b: number) => void;
|
|
456
463
|
export const wasm_bindgen__convert__closures_____invoke__h43dfd80678632d6f: (
|
|
457
464
|
a: number,
|
|
458
465
|
b: number,
|