@bitwarden/commercial-sdk-internal 0.2.0-main.397 → 0.2.0-main.399
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 +67 -34
- package/bitwarden_wasm_internal_bg.wasm +0 -0
- package/bitwarden_wasm_internal_bg.wasm.d.ts +10 -3
- package/bitwarden_wasm_internal_bg.wasm.js +1 -1
- package/node/bitwarden_wasm_internal.d.ts +8 -0
- package/node/bitwarden_wasm_internal.js +59 -26
- package/node/bitwarden_wasm_internal_bg.wasm +0 -0
- package/node/bitwarden_wasm_internal_bg.wasm.d.ts +8 -1
- 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,14 +868,6 @@ export function isEncryptFileError(error) {
|
|
|
868
868
|
}
|
|
869
869
|
}
|
|
870
870
|
|
|
871
|
-
function wasm_bindgen__convert__closures_____invoke__hb0cefc4a47b27ccb(arg0, arg1, arg2) {
|
|
872
|
-
wasm.wasm_bindgen__convert__closures_____invoke__hb0cefc4a47b27ccb(
|
|
873
|
-
arg0,
|
|
874
|
-
arg1,
|
|
875
|
-
addHeapObject(arg2),
|
|
876
|
-
);
|
|
877
|
-
}
|
|
878
|
-
|
|
879
871
|
function wasm_bindgen__convert__closures_____invoke__h59c036539ecefa06(arg0, arg1, arg2) {
|
|
880
872
|
try {
|
|
881
873
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
@@ -895,6 +887,14 @@ function wasm_bindgen__convert__closures_____invoke__h59c036539ecefa06(arg0, arg
|
|
|
895
887
|
}
|
|
896
888
|
}
|
|
897
889
|
|
|
890
|
+
function wasm_bindgen__convert__closures_____invoke__hb0cefc4a47b27ccb(arg0, arg1, arg2) {
|
|
891
|
+
wasm.wasm_bindgen__convert__closures_____invoke__hb0cefc4a47b27ccb(
|
|
892
|
+
arg0,
|
|
893
|
+
arg1,
|
|
894
|
+
addHeapObject(arg2),
|
|
895
|
+
);
|
|
896
|
+
}
|
|
897
|
+
|
|
898
898
|
function wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e(arg0, arg1) {
|
|
899
899
|
wasm.wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e(arg0, arg1);
|
|
900
900
|
}
|
|
@@ -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_c5d7f3af290bbbf4(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_149190ff7ec60f4c(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_3763d86f09fb65c6() {
|
|
4631
4664
|
return handleError(function (arg0, arg1, arg2) {
|
|
4632
4665
|
let deferred0_0;
|
|
4633
4666
|
let deferred0_1;
|
|
@@ -4647,19 +4680,7 @@ export function __wbg_get_7bed016f185add81(arg0, arg1) {
|
|
|
4647
4680
|
return addHeapObject(ret);
|
|
4648
4681
|
}
|
|
4649
4682
|
|
|
4650
|
-
export function
|
|
4651
|
-
const ret = getObject(arg0).get_access_token();
|
|
4652
|
-
return addHeapObject(ret);
|
|
4653
|
-
}
|
|
4654
|
-
|
|
4655
|
-
export function __wbg_get_efcb449f58ec27c2() {
|
|
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() {
|
|
4683
|
+
export function __wbg_get_97be5c58774542cd() {
|
|
4663
4684
|
return handleError(function (arg0, arg1, arg2) {
|
|
4664
4685
|
let deferred0_0;
|
|
4665
4686
|
let deferred0_1;
|
|
@@ -4674,6 +4695,18 @@ export function __wbg_get_f836288e48750d27() {
|
|
|
4674
4695
|
}, arguments);
|
|
4675
4696
|
}
|
|
4676
4697
|
|
|
4698
|
+
export function __wbg_get_access_token_afc3b106f073fd8e(arg0) {
|
|
4699
|
+
const ret = getObject(arg0).get_access_token();
|
|
4700
|
+
return addHeapObject(ret);
|
|
4701
|
+
}
|
|
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_53991bc038506fbc() {
|
|
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_ff71f59ca6f21505() {
|
|
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_a5d30e4a14a4441b() {
|
|
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_e0d5d52e4d454588() {
|
|
5128
5161
|
return handleError(function (arg0, arg1, arg2) {
|
|
5129
5162
|
let deferred0_0;
|
|
5130
5163
|
let deferred0_1;
|
|
@@ -5170,11 +5203,7 @@ export function __wbg_setTimeout_ca12ead8b48245e2(arg0, arg1) {
|
|
|
5170
5203
|
return addHeapObject(ret);
|
|
5171
5204
|
}
|
|
5172
5205
|
|
|
5173
|
-
export function
|
|
5174
|
-
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
5175
|
-
}
|
|
5176
|
-
|
|
5177
|
-
export function __wbg_set_4f10240cec7c0329() {
|
|
5206
|
+
export function __wbg_set_2d0a9c1f306162b7() {
|
|
5178
5207
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
5179
5208
|
let deferred0_0;
|
|
5180
5209
|
let deferred0_1;
|
|
@@ -5189,7 +5218,7 @@ export function __wbg_set_4f10240cec7c0329() {
|
|
|
5189
5218
|
}, arguments);
|
|
5190
5219
|
}
|
|
5191
5220
|
|
|
5192
|
-
export function
|
|
5221
|
+
export function __wbg_set_32ec33366f931747() {
|
|
5193
5222
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
5194
5223
|
let deferred0_0;
|
|
5195
5224
|
let deferred0_1;
|
|
@@ -5204,6 +5233,10 @@ export function __wbg_set_8bf42eeed138232a() {
|
|
|
5204
5233
|
}, arguments);
|
|
5205
5234
|
}
|
|
5206
5235
|
|
|
5236
|
+
export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
|
|
5237
|
+
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
5238
|
+
}
|
|
5239
|
+
|
|
5207
5240
|
export function __wbg_set_907fb406c34a251d(arg0, arg1, arg2) {
|
|
5208
5241
|
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
|
5209
5242
|
return addHeapObject(ret);
|
|
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,17 +442,17 @@ 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
|
|
445
|
+
export const wasm_bindgen__convert__closures_____invoke__h59c036539ecefa06: (
|
|
439
446
|
a: number,
|
|
440
447
|
b: number,
|
|
441
448
|
c: number,
|
|
449
|
+
d: number,
|
|
442
450
|
) => void;
|
|
443
451
|
export const wasm_bindgen__closure__destroy__hd2baf0154e030ab9: (a: number, b: number) => void;
|
|
444
|
-
export const
|
|
452
|
+
export const wasm_bindgen__convert__closures_____invoke__hb0cefc4a47b27ccb: (
|
|
445
453
|
a: number,
|
|
446
454
|
b: number,
|
|
447
455
|
c: number,
|
|
448
|
-
d: number,
|
|
449
456
|
) => void;
|
|
450
457
|
export const wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e: (
|
|
451
458
|
a: number,
|