@bitwarden/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/VERSION +1 -1
- package/bitwarden_wasm_internal.d.ts +8 -0
- package/bitwarden_wasm_internal_bg.js +83 -50
- 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 +8 -1
- package/package.json +1 -1
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
efed963c6b459ceb4dc4645a650abee499b306eb
|
|
@@ -2423,6 +2423,14 @@ export class PureCrypto {
|
|
|
2423
2423
|
encrypted_user_key: string,
|
|
2424
2424
|
master_key: Uint8Array,
|
|
2425
2425
|
): Uint8Array;
|
|
2426
|
+
/**
|
|
2427
|
+
* Given an encrypted private RSA key and the symmetric key it is wrapped with, this returns
|
|
2428
|
+
* the corresponding public RSA key in DER format.
|
|
2429
|
+
*/
|
|
2430
|
+
static rsa_extract_public_key(
|
|
2431
|
+
encrypted_private_key: string,
|
|
2432
|
+
wrapping_key: Uint8Array,
|
|
2433
|
+
): Uint8Array;
|
|
2426
2434
|
}
|
|
2427
2435
|
/**
|
|
2428
2436
|
* The `SendAccessClient` is used to interact with the Bitwarden API to get send access tokens.
|
|
@@ -868,10 +868,6 @@ 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
871
|
function wasm_bindgen__convert__closures_____invoke__hdc41283f124c06e5(arg0, arg1, arg2) {
|
|
876
872
|
wasm.wasm_bindgen__convert__closures_____invoke__hdc41283f124c06e5(
|
|
877
873
|
arg0,
|
|
@@ -899,6 +895,10 @@ function wasm_bindgen__convert__closures_____invoke__h1a8786b7bd5c2cf5(arg0, arg
|
|
|
899
895
|
}
|
|
900
896
|
}
|
|
901
897
|
|
|
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,
|
|
@@ -4011,6 +4011,39 @@ export class PureCrypto {
|
|
|
4011
4011
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
4012
4012
|
}
|
|
4013
4013
|
}
|
|
4014
|
+
/**
|
|
4015
|
+
* Given an encrypted private RSA key and the symmetric key it is wrapped with, this returns
|
|
4016
|
+
* the corresponding public RSA key in DER format.
|
|
4017
|
+
* @param {string} encrypted_private_key
|
|
4018
|
+
* @param {Uint8Array} wrapping_key
|
|
4019
|
+
* @returns {Uint8Array}
|
|
4020
|
+
*/
|
|
4021
|
+
static rsa_extract_public_key(encrypted_private_key, wrapping_key) {
|
|
4022
|
+
try {
|
|
4023
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
4024
|
+
const ptr0 = passStringToWasm0(
|
|
4025
|
+
encrypted_private_key,
|
|
4026
|
+
wasm.__wbindgen_malloc,
|
|
4027
|
+
wasm.__wbindgen_realloc,
|
|
4028
|
+
);
|
|
4029
|
+
const len0 = WASM_VECTOR_LEN;
|
|
4030
|
+
const ptr1 = passArray8ToWasm0(wrapping_key, wasm.__wbindgen_malloc);
|
|
4031
|
+
const len1 = WASM_VECTOR_LEN;
|
|
4032
|
+
wasm.purecrypto_rsa_extract_public_key(retptr, ptr0, len0, ptr1, len1);
|
|
4033
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
4034
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
4035
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
4036
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
4037
|
+
if (r3) {
|
|
4038
|
+
throw takeObject(r2);
|
|
4039
|
+
}
|
|
4040
|
+
var v3 = getArrayU8FromWasm0(r0, r1).slice();
|
|
4041
|
+
wasm.__wbindgen_free(r0, r1 * 1, 1);
|
|
4042
|
+
return v3;
|
|
4043
|
+
} finally {
|
|
4044
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
4045
|
+
}
|
|
4046
|
+
}
|
|
4014
4047
|
}
|
|
4015
4048
|
if (Symbol.dispose) PureCrypto.prototype[Symbol.dispose] = PureCrypto.prototype.free;
|
|
4016
4049
|
|
|
@@ -4428,7 +4461,7 @@ export function __wbg_call_e762c39fa8ea36bf() {
|
|
|
4428
4461
|
}, arguments);
|
|
4429
4462
|
}
|
|
4430
4463
|
|
|
4431
|
-
export function
|
|
4464
|
+
export function __wbg_cipher_27b0aefec8023efb(arg0) {
|
|
4432
4465
|
const ret = getObject(arg0).cipher;
|
|
4433
4466
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
4434
4467
|
}
|
|
@@ -4521,7 +4554,7 @@ export function __wbg_fetch_f8ba0e29a9d6de0d(arg0, arg1) {
|
|
|
4521
4554
|
return addHeapObject(ret);
|
|
4522
4555
|
}
|
|
4523
4556
|
|
|
4524
|
-
export function
|
|
4557
|
+
export function __wbg_folder_d6a2d6a9d32f3686(arg0) {
|
|
4525
4558
|
const ret = getObject(arg0).folder;
|
|
4526
4559
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
4527
4560
|
}
|
|
@@ -4548,7 +4581,7 @@ export function __wbg_getTime_14776bfb48a1bff9(arg0) {
|
|
|
4548
4581
|
return ret;
|
|
4549
4582
|
}
|
|
4550
4583
|
|
|
4551
|
-
export function
|
|
4584
|
+
export function __wbg_get_70485431d7544ae5() {
|
|
4552
4585
|
return handleError(function (arg0, arg1, arg2) {
|
|
4553
4586
|
let deferred0_0;
|
|
4554
4587
|
let deferred0_1;
|
|
@@ -4568,19 +4601,12 @@ export function __wbg_get_7bed016f185add81(arg0, arg1) {
|
|
|
4568
4601
|
return addHeapObject(ret);
|
|
4569
4602
|
}
|
|
4570
4603
|
|
|
4571
|
-
export function
|
|
4604
|
+
export function __wbg_get_access_token_048717a0999058da(arg0) {
|
|
4572
4605
|
const ret = getObject(arg0).get_access_token();
|
|
4573
4606
|
return addHeapObject(ret);
|
|
4574
4607
|
}
|
|
4575
4608
|
|
|
4576
|
-
export function
|
|
4577
|
-
return handleError(function (arg0, arg1) {
|
|
4578
|
-
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
4579
|
-
return addHeapObject(ret);
|
|
4580
|
-
}, arguments);
|
|
4581
|
-
}
|
|
4582
|
-
|
|
4583
|
-
export function __wbg_get_f97d1609fe1ef27f() {
|
|
4609
|
+
export function __wbg_get_bd5598ce2fa61fe7() {
|
|
4584
4610
|
return handleError(function (arg0, arg1, arg2) {
|
|
4585
4611
|
let deferred0_0;
|
|
4586
4612
|
let deferred0_1;
|
|
@@ -4595,6 +4621,13 @@ export function __wbg_get_f97d1609fe1ef27f() {
|
|
|
4595
4621
|
}, arguments);
|
|
4596
4622
|
}
|
|
4597
4623
|
|
|
4624
|
+
export function __wbg_get_efcb449f58ec27c2() {
|
|
4625
|
+
return handleError(function (arg0, arg1) {
|
|
4626
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
4627
|
+
return addHeapObject(ret);
|
|
4628
|
+
}, arguments);
|
|
4629
|
+
}
|
|
4630
|
+
|
|
4598
4631
|
export function __wbg_get_with_ref_key_1dc361bd10053bfe(arg0, arg1) {
|
|
4599
4632
|
const ret = getObject(arg0)[getObject(arg1)];
|
|
4600
4633
|
return addHeapObject(ret);
|
|
@@ -4779,14 +4812,14 @@ export function __wbg_length_cdd215e10d9dd507(arg0) {
|
|
|
4779
4812
|
return ret;
|
|
4780
4813
|
}
|
|
4781
4814
|
|
|
4782
|
-
export function
|
|
4815
|
+
export function __wbg_list_4789a1cc32867476() {
|
|
4783
4816
|
return handleError(function (arg0) {
|
|
4784
4817
|
const ret = getObject(arg0).list();
|
|
4785
4818
|
return addHeapObject(ret);
|
|
4786
4819
|
}, arguments);
|
|
4787
4820
|
}
|
|
4788
4821
|
|
|
4789
|
-
export function
|
|
4822
|
+
export function __wbg_list_65a7f325af23cc73() {
|
|
4790
4823
|
return handleError(function (arg0) {
|
|
4791
4824
|
const ret = getObject(arg0).list();
|
|
4792
4825
|
return addHeapObject(ret);
|
|
@@ -5030,7 +5063,7 @@ export function __wbg_randomFillSync_ac0988aba3254290() {
|
|
|
5030
5063
|
}, arguments);
|
|
5031
5064
|
}
|
|
5032
5065
|
|
|
5033
|
-
export function
|
|
5066
|
+
export function __wbg_remove_0825e8a0ec895d58() {
|
|
5034
5067
|
return handleError(function (arg0, arg1, arg2) {
|
|
5035
5068
|
let deferred0_0;
|
|
5036
5069
|
let deferred0_1;
|
|
@@ -5045,7 +5078,7 @@ export function __wbg_remove_3594f15e8fca4743() {
|
|
|
5045
5078
|
}, arguments);
|
|
5046
5079
|
}
|
|
5047
5080
|
|
|
5048
|
-
export function
|
|
5081
|
+
export function __wbg_remove_ce09ed4fa7b19fbf() {
|
|
5049
5082
|
return handleError(function (arg0, arg1, arg2) {
|
|
5050
5083
|
let deferred0_0;
|
|
5051
5084
|
let deferred0_1;
|
|
@@ -5091,40 +5124,10 @@ export function __wbg_setTimeout_ca12ead8b48245e2(arg0, arg1) {
|
|
|
5091
5124
|
return addHeapObject(ret);
|
|
5092
5125
|
}
|
|
5093
5126
|
|
|
5094
|
-
export function __wbg_set_0159738cb1dd7a1d() {
|
|
5095
|
-
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
5096
|
-
let deferred0_0;
|
|
5097
|
-
let deferred0_1;
|
|
5098
|
-
try {
|
|
5099
|
-
deferred0_0 = arg1;
|
|
5100
|
-
deferred0_1 = arg2;
|
|
5101
|
-
const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
|
|
5102
|
-
return addHeapObject(ret);
|
|
5103
|
-
} finally {
|
|
5104
|
-
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
5105
|
-
}
|
|
5106
|
-
}, arguments);
|
|
5107
|
-
}
|
|
5108
|
-
|
|
5109
5127
|
export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
|
|
5110
5128
|
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
5111
5129
|
}
|
|
5112
5130
|
|
|
5113
|
-
export function __wbg_set_834a40164c1f126c() {
|
|
5114
|
-
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
5115
|
-
let deferred0_0;
|
|
5116
|
-
let deferred0_1;
|
|
5117
|
-
try {
|
|
5118
|
-
deferred0_0 = arg1;
|
|
5119
|
-
deferred0_1 = arg2;
|
|
5120
|
-
const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
|
|
5121
|
-
return addHeapObject(ret);
|
|
5122
|
-
} finally {
|
|
5123
|
-
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
5124
|
-
}
|
|
5125
|
-
}, arguments);
|
|
5126
|
-
}
|
|
5127
|
-
|
|
5128
5131
|
export function __wbg_set_907fb406c34a251d(arg0, arg1, arg2) {
|
|
5129
5132
|
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
|
5130
5133
|
return addHeapObject(ret);
|
|
@@ -5149,6 +5152,36 @@ export function __wbg_set_credentials_f621cd2d85c0c228(arg0, arg1) {
|
|
|
5149
5152
|
getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
5150
5153
|
}
|
|
5151
5154
|
|
|
5155
|
+
export function __wbg_set_e12e8ea9f0a95d29() {
|
|
5156
|
+
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
5157
|
+
let deferred0_0;
|
|
5158
|
+
let deferred0_1;
|
|
5159
|
+
try {
|
|
5160
|
+
deferred0_0 = arg1;
|
|
5161
|
+
deferred0_1 = arg2;
|
|
5162
|
+
const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
|
|
5163
|
+
return addHeapObject(ret);
|
|
5164
|
+
} finally {
|
|
5165
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
5166
|
+
}
|
|
5167
|
+
}, arguments);
|
|
5168
|
+
}
|
|
5169
|
+
|
|
5170
|
+
export function __wbg_set_e4af713e5ff898d5() {
|
|
5171
|
+
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
5172
|
+
let deferred0_0;
|
|
5173
|
+
let deferred0_1;
|
|
5174
|
+
try {
|
|
5175
|
+
deferred0_0 = arg1;
|
|
5176
|
+
deferred0_1 = arg2;
|
|
5177
|
+
const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
|
|
5178
|
+
return addHeapObject(ret);
|
|
5179
|
+
} finally {
|
|
5180
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
5181
|
+
}
|
|
5182
|
+
}, arguments);
|
|
5183
|
+
}
|
|
5184
|
+
|
|
5152
5185
|
export function __wbg_set_headers_6926da238cd32ee4(arg0, arg1) {
|
|
5153
5186
|
getObject(arg0).headers = getObject(arg1);
|
|
5154
5187
|
}
|
|
Binary file
|
|
@@ -177,6 +177,13 @@ export const purecrypto_decrypt_user_key_with_master_key: (
|
|
|
177
177
|
d: number,
|
|
178
178
|
e: number,
|
|
179
179
|
) => void;
|
|
180
|
+
export const purecrypto_rsa_extract_public_key: (
|
|
181
|
+
a: number,
|
|
182
|
+
b: number,
|
|
183
|
+
c: number,
|
|
184
|
+
d: number,
|
|
185
|
+
e: number,
|
|
186
|
+
) => void;
|
|
180
187
|
export const generate_ssh_key: (a: number, b: number) => void;
|
|
181
188
|
export const import_ssh_key: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
182
189
|
export const isTestError: (a: number) => number;
|
|
@@ -431,24 +438,24 @@ export const __wbg_totpclient_free: (a: number, b: number) => void;
|
|
|
431
438
|
export const __wbg_get_outgoingmessage_destination: (a: number) => number;
|
|
432
439
|
export const __wbg_set_outgoingmessage_destination: (a: number, b: number) => void;
|
|
433
440
|
export const __wbg_cryptoclient_free: (a: number, b: number) => void;
|
|
434
|
-
export const wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e: (
|
|
435
|
-
a: number,
|
|
436
|
-
b: number,
|
|
437
|
-
) => void;
|
|
438
|
-
export const wasm_bindgen__closure__destroy__hfcb631b72e5e985c: (a: number, b: number) => void;
|
|
439
441
|
export const wasm_bindgen__convert__closures_____invoke__hdc41283f124c06e5: (
|
|
440
442
|
a: number,
|
|
441
443
|
b: number,
|
|
442
444
|
c: number,
|
|
443
445
|
) => void;
|
|
444
446
|
export const wasm_bindgen__closure__destroy__h5bf455f3385c4f71: (a: number, b: number) => void;
|
|
445
|
-
export const wasm_bindgen__closure__destroy__h1470697583ce3ba3: (a: number, b: number) => void;
|
|
446
447
|
export const wasm_bindgen__convert__closures_____invoke__h1a8786b7bd5c2cf5: (
|
|
447
448
|
a: number,
|
|
448
449
|
b: number,
|
|
449
450
|
c: number,
|
|
450
451
|
d: number,
|
|
451
452
|
) => void;
|
|
453
|
+
export const wasm_bindgen__closure__destroy__h1470697583ce3ba3: (a: number, b: number) => void;
|
|
454
|
+
export const wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e: (
|
|
455
|
+
a: number,
|
|
456
|
+
b: number,
|
|
457
|
+
) => void;
|
|
458
|
+
export const wasm_bindgen__closure__destroy__hfcb631b72e5e985c: (a: number, b: number) => void;
|
|
452
459
|
export const wasm_bindgen__convert__closures_____invoke__h43dfd80678632d6f: (
|
|
453
460
|
a: number,
|
|
454
461
|
b: number,
|