@bitwarden/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/VERSION +1 -1
- package/bitwarden_wasm_internal.d.ts +8 -0
- package/bitwarden_wasm_internal_bg.js +75 -42
- package/bitwarden_wasm_internal_bg.wasm +0 -0
- package/bitwarden_wasm_internal_bg.wasm.d.ts +9 -2
- 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 +11 -4
- 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.
|
|
@@ -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_f836288e48750d27() {
|
|
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_f836288e48750d27() {
|
|
|
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_6e0b8907d2143b2a() {
|
|
|
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;
|
|
@@ -5095,7 +5128,31 @@ export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
|
|
|
5095
5128
|
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
5096
5129
|
}
|
|
5097
5130
|
|
|
5098
|
-
export function
|
|
5131
|
+
export function __wbg_set_907fb406c34a251d(arg0, arg1, arg2) {
|
|
5132
|
+
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
|
5133
|
+
return addHeapObject(ret);
|
|
5134
|
+
}
|
|
5135
|
+
|
|
5136
|
+
export function __wbg_set_body_3c365989753d61f4(arg0, arg1) {
|
|
5137
|
+
getObject(arg0).body = getObject(arg1);
|
|
5138
|
+
}
|
|
5139
|
+
|
|
5140
|
+
export function __wbg_set_c213c871859d6500(arg0, arg1, arg2) {
|
|
5141
|
+
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
5142
|
+
}
|
|
5143
|
+
|
|
5144
|
+
export function __wbg_set_c2abbebe8b9ebee1() {
|
|
5145
|
+
return handleError(function (arg0, arg1, arg2) {
|
|
5146
|
+
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
5147
|
+
return ret;
|
|
5148
|
+
}, arguments);
|
|
5149
|
+
}
|
|
5150
|
+
|
|
5151
|
+
export function __wbg_set_credentials_f621cd2d85c0c228(arg0, arg1) {
|
|
5152
|
+
getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
5153
|
+
}
|
|
5154
|
+
|
|
5155
|
+
export function __wbg_set_e12e8ea9f0a95d29() {
|
|
5099
5156
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
5100
5157
|
let deferred0_0;
|
|
5101
5158
|
let deferred0_1;
|
|
@@ -5110,7 +5167,7 @@ export function __wbg_set_4f10240cec7c0329() {
|
|
|
5110
5167
|
}, arguments);
|
|
5111
5168
|
}
|
|
5112
5169
|
|
|
5113
|
-
export function
|
|
5170
|
+
export function __wbg_set_e4af713e5ff898d5() {
|
|
5114
5171
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
5115
5172
|
let deferred0_0;
|
|
5116
5173
|
let deferred0_1;
|
|
@@ -5125,30 +5182,6 @@ export function __wbg_set_8bf42eeed138232a() {
|
|
|
5125
5182
|
}, arguments);
|
|
5126
5183
|
}
|
|
5127
5184
|
|
|
5128
|
-
export function __wbg_set_907fb406c34a251d(arg0, arg1, arg2) {
|
|
5129
|
-
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
|
5130
|
-
return addHeapObject(ret);
|
|
5131
|
-
}
|
|
5132
|
-
|
|
5133
|
-
export function __wbg_set_body_3c365989753d61f4(arg0, arg1) {
|
|
5134
|
-
getObject(arg0).body = getObject(arg1);
|
|
5135
|
-
}
|
|
5136
|
-
|
|
5137
|
-
export function __wbg_set_c213c871859d6500(arg0, arg1, arg2) {
|
|
5138
|
-
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
5139
|
-
}
|
|
5140
|
-
|
|
5141
|
-
export function __wbg_set_c2abbebe8b9ebee1() {
|
|
5142
|
-
return handleError(function (arg0, arg1, arg2) {
|
|
5143
|
-
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
5144
|
-
return ret;
|
|
5145
|
-
}, arguments);
|
|
5146
|
-
}
|
|
5147
|
-
|
|
5148
|
-
export function __wbg_set_credentials_f621cd2d85c0c228(arg0, arg1) {
|
|
5149
|
-
getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
5150
|
-
}
|
|
5151
|
-
|
|
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;
|
|
@@ -436,19 +443,19 @@ export const wasm_bindgen__convert__closures_____invoke__hdc41283f124c06e5: (
|
|
|
436
443
|
b: number,
|
|
437
444
|
c: number,
|
|
438
445
|
) => void;
|
|
439
|
-
export const
|
|
446
|
+
export const wasm_bindgen__closure__destroy__h5bf455f3385c4f71: (a: number, b: number) => void;
|
|
440
447
|
export const wasm_bindgen__convert__closures_____invoke__h1a8786b7bd5c2cf5: (
|
|
441
448
|
a: number,
|
|
442
449
|
b: number,
|
|
443
450
|
c: number,
|
|
444
451
|
d: number,
|
|
445
452
|
) => void;
|
|
453
|
+
export const wasm_bindgen__closure__destroy__h1470697583ce3ba3: (a: number, b: number) => void;
|
|
446
454
|
export const wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e: (
|
|
447
455
|
a: number,
|
|
448
456
|
b: number,
|
|
449
457
|
) => void;
|
|
450
458
|
export const wasm_bindgen__closure__destroy__hfcb631b72e5e985c: (a: number, b: number) => void;
|
|
451
|
-
export const wasm_bindgen__closure__destroy__h5bf455f3385c4f71: (a: number, b: number) => void;
|
|
452
459
|
export const wasm_bindgen__convert__closures_____invoke__h43dfd80678632d6f: (
|
|
453
460
|
a: number,
|
|
454
461
|
b: number,
|