@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
|
@@ -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.
|
|
@@ -4039,6 +4039,39 @@ class PureCrypto {
|
|
|
4039
4039
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
4040
4040
|
}
|
|
4041
4041
|
}
|
|
4042
|
+
/**
|
|
4043
|
+
* Given an encrypted private RSA key and the symmetric key it is wrapped with, this returns
|
|
4044
|
+
* the corresponding public RSA key in DER format.
|
|
4045
|
+
* @param {string} encrypted_private_key
|
|
4046
|
+
* @param {Uint8Array} wrapping_key
|
|
4047
|
+
* @returns {Uint8Array}
|
|
4048
|
+
*/
|
|
4049
|
+
static rsa_extract_public_key(encrypted_private_key, wrapping_key) {
|
|
4050
|
+
try {
|
|
4051
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
4052
|
+
const ptr0 = passStringToWasm0(
|
|
4053
|
+
encrypted_private_key,
|
|
4054
|
+
wasm.__wbindgen_malloc,
|
|
4055
|
+
wasm.__wbindgen_realloc,
|
|
4056
|
+
);
|
|
4057
|
+
const len0 = WASM_VECTOR_LEN;
|
|
4058
|
+
const ptr1 = passArray8ToWasm0(wrapping_key, wasm.__wbindgen_malloc);
|
|
4059
|
+
const len1 = WASM_VECTOR_LEN;
|
|
4060
|
+
wasm.purecrypto_rsa_extract_public_key(retptr, ptr0, len0, ptr1, len1);
|
|
4061
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
4062
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
4063
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
4064
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
4065
|
+
if (r3) {
|
|
4066
|
+
throw takeObject(r2);
|
|
4067
|
+
}
|
|
4068
|
+
var v3 = getArrayU8FromWasm0(r0, r1).slice();
|
|
4069
|
+
wasm.__wbindgen_free(r0, r1 * 1, 1);
|
|
4070
|
+
return v3;
|
|
4071
|
+
} finally {
|
|
4072
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
4073
|
+
}
|
|
4074
|
+
}
|
|
4042
4075
|
}
|
|
4043
4076
|
if (Symbol.dispose) PureCrypto.prototype[Symbol.dispose] = PureCrypto.prototype.free;
|
|
4044
4077
|
|
|
@@ -4466,7 +4499,7 @@ exports.__wbg_call_e762c39fa8ea36bf = function () {
|
|
|
4466
4499
|
}, arguments);
|
|
4467
4500
|
};
|
|
4468
4501
|
|
|
4469
|
-
exports.
|
|
4502
|
+
exports.__wbg_cipher_27b0aefec8023efb = function (arg0) {
|
|
4470
4503
|
const ret = getObject(arg0).cipher;
|
|
4471
4504
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
4472
4505
|
};
|
|
@@ -4559,7 +4592,7 @@ exports.__wbg_fetch_f8ba0e29a9d6de0d = function (arg0, arg1) {
|
|
|
4559
4592
|
return addHeapObject(ret);
|
|
4560
4593
|
};
|
|
4561
4594
|
|
|
4562
|
-
exports.
|
|
4595
|
+
exports.__wbg_folder_d6a2d6a9d32f3686 = function (arg0) {
|
|
4563
4596
|
const ret = getObject(arg0).folder;
|
|
4564
4597
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
4565
4598
|
};
|
|
@@ -4586,7 +4619,7 @@ exports.__wbg_getTime_14776bfb48a1bff9 = function (arg0) {
|
|
|
4586
4619
|
return ret;
|
|
4587
4620
|
};
|
|
4588
4621
|
|
|
4589
|
-
exports.
|
|
4622
|
+
exports.__wbg_get_70485431d7544ae5 = function () {
|
|
4590
4623
|
return handleError(function (arg0, arg1, arg2) {
|
|
4591
4624
|
let deferred0_0;
|
|
4592
4625
|
let deferred0_1;
|
|
@@ -4606,19 +4639,12 @@ exports.__wbg_get_7bed016f185add81 = function (arg0, arg1) {
|
|
|
4606
4639
|
return addHeapObject(ret);
|
|
4607
4640
|
};
|
|
4608
4641
|
|
|
4609
|
-
exports.
|
|
4642
|
+
exports.__wbg_get_access_token_048717a0999058da = function (arg0) {
|
|
4610
4643
|
const ret = getObject(arg0).get_access_token();
|
|
4611
4644
|
return addHeapObject(ret);
|
|
4612
4645
|
};
|
|
4613
4646
|
|
|
4614
|
-
exports.
|
|
4615
|
-
return handleError(function (arg0, arg1) {
|
|
4616
|
-
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
4617
|
-
return addHeapObject(ret);
|
|
4618
|
-
}, arguments);
|
|
4619
|
-
};
|
|
4620
|
-
|
|
4621
|
-
exports.__wbg_get_f97d1609fe1ef27f = function () {
|
|
4647
|
+
exports.__wbg_get_bd5598ce2fa61fe7 = function () {
|
|
4622
4648
|
return handleError(function (arg0, arg1, arg2) {
|
|
4623
4649
|
let deferred0_0;
|
|
4624
4650
|
let deferred0_1;
|
|
@@ -4633,6 +4659,13 @@ exports.__wbg_get_f97d1609fe1ef27f = function () {
|
|
|
4633
4659
|
}, arguments);
|
|
4634
4660
|
};
|
|
4635
4661
|
|
|
4662
|
+
exports.__wbg_get_efcb449f58ec27c2 = function () {
|
|
4663
|
+
return handleError(function (arg0, arg1) {
|
|
4664
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
4665
|
+
return addHeapObject(ret);
|
|
4666
|
+
}, arguments);
|
|
4667
|
+
};
|
|
4668
|
+
|
|
4636
4669
|
exports.__wbg_get_with_ref_key_1dc361bd10053bfe = function (arg0, arg1) {
|
|
4637
4670
|
const ret = getObject(arg0)[getObject(arg1)];
|
|
4638
4671
|
return addHeapObject(ret);
|
|
@@ -4817,14 +4850,14 @@ exports.__wbg_length_cdd215e10d9dd507 = function (arg0) {
|
|
|
4817
4850
|
return ret;
|
|
4818
4851
|
};
|
|
4819
4852
|
|
|
4820
|
-
exports.
|
|
4853
|
+
exports.__wbg_list_4789a1cc32867476 = function () {
|
|
4821
4854
|
return handleError(function (arg0) {
|
|
4822
4855
|
const ret = getObject(arg0).list();
|
|
4823
4856
|
return addHeapObject(ret);
|
|
4824
4857
|
}, arguments);
|
|
4825
4858
|
};
|
|
4826
4859
|
|
|
4827
|
-
exports.
|
|
4860
|
+
exports.__wbg_list_65a7f325af23cc73 = function () {
|
|
4828
4861
|
return handleError(function (arg0) {
|
|
4829
4862
|
const ret = getObject(arg0).list();
|
|
4830
4863
|
return addHeapObject(ret);
|
|
@@ -5068,7 +5101,7 @@ exports.__wbg_randomFillSync_ac0988aba3254290 = function () {
|
|
|
5068
5101
|
}, arguments);
|
|
5069
5102
|
};
|
|
5070
5103
|
|
|
5071
|
-
exports.
|
|
5104
|
+
exports.__wbg_remove_0825e8a0ec895d58 = function () {
|
|
5072
5105
|
return handleError(function (arg0, arg1, arg2) {
|
|
5073
5106
|
let deferred0_0;
|
|
5074
5107
|
let deferred0_1;
|
|
@@ -5083,7 +5116,7 @@ exports.__wbg_remove_3594f15e8fca4743 = function () {
|
|
|
5083
5116
|
}, arguments);
|
|
5084
5117
|
};
|
|
5085
5118
|
|
|
5086
|
-
exports.
|
|
5119
|
+
exports.__wbg_remove_ce09ed4fa7b19fbf = function () {
|
|
5087
5120
|
return handleError(function (arg0, arg1, arg2) {
|
|
5088
5121
|
let deferred0_0;
|
|
5089
5122
|
let deferred0_1;
|
|
@@ -5129,40 +5162,10 @@ exports.__wbg_setTimeout_ca12ead8b48245e2 = function (arg0, arg1) {
|
|
|
5129
5162
|
return addHeapObject(ret);
|
|
5130
5163
|
};
|
|
5131
5164
|
|
|
5132
|
-
exports.__wbg_set_0159738cb1dd7a1d = function () {
|
|
5133
|
-
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
5134
|
-
let deferred0_0;
|
|
5135
|
-
let deferred0_1;
|
|
5136
|
-
try {
|
|
5137
|
-
deferred0_0 = arg1;
|
|
5138
|
-
deferred0_1 = arg2;
|
|
5139
|
-
const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
|
|
5140
|
-
return addHeapObject(ret);
|
|
5141
|
-
} finally {
|
|
5142
|
-
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
5143
|
-
}
|
|
5144
|
-
}, arguments);
|
|
5145
|
-
};
|
|
5146
|
-
|
|
5147
5165
|
exports.__wbg_set_3f1d0b984ed272ed = function (arg0, arg1, arg2) {
|
|
5148
5166
|
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
5149
5167
|
};
|
|
5150
5168
|
|
|
5151
|
-
exports.__wbg_set_834a40164c1f126c = function () {
|
|
5152
|
-
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
5153
|
-
let deferred0_0;
|
|
5154
|
-
let deferred0_1;
|
|
5155
|
-
try {
|
|
5156
|
-
deferred0_0 = arg1;
|
|
5157
|
-
deferred0_1 = arg2;
|
|
5158
|
-
const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
|
|
5159
|
-
return addHeapObject(ret);
|
|
5160
|
-
} finally {
|
|
5161
|
-
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
5162
|
-
}
|
|
5163
|
-
}, arguments);
|
|
5164
|
-
};
|
|
5165
|
-
|
|
5166
5169
|
exports.__wbg_set_907fb406c34a251d = function (arg0, arg1, arg2) {
|
|
5167
5170
|
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
|
5168
5171
|
return addHeapObject(ret);
|
|
@@ -5187,6 +5190,36 @@ exports.__wbg_set_credentials_f621cd2d85c0c228 = function (arg0, arg1) {
|
|
|
5187
5190
|
getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
5188
5191
|
};
|
|
5189
5192
|
|
|
5193
|
+
exports.__wbg_set_e12e8ea9f0a95d29 = function () {
|
|
5194
|
+
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
5195
|
+
let deferred0_0;
|
|
5196
|
+
let deferred0_1;
|
|
5197
|
+
try {
|
|
5198
|
+
deferred0_0 = arg1;
|
|
5199
|
+
deferred0_1 = arg2;
|
|
5200
|
+
const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
|
|
5201
|
+
return addHeapObject(ret);
|
|
5202
|
+
} finally {
|
|
5203
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
5204
|
+
}
|
|
5205
|
+
}, arguments);
|
|
5206
|
+
};
|
|
5207
|
+
|
|
5208
|
+
exports.__wbg_set_e4af713e5ff898d5 = function () {
|
|
5209
|
+
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
5210
|
+
let deferred0_0;
|
|
5211
|
+
let deferred0_1;
|
|
5212
|
+
try {
|
|
5213
|
+
deferred0_0 = arg1;
|
|
5214
|
+
deferred0_1 = arg2;
|
|
5215
|
+
const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
|
|
5216
|
+
return addHeapObject(ret);
|
|
5217
|
+
} finally {
|
|
5218
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
5219
|
+
}
|
|
5220
|
+
}, arguments);
|
|
5221
|
+
};
|
|
5222
|
+
|
|
5190
5223
|
exports.__wbg_set_headers_6926da238cd32ee4 = function (arg0, arg1) {
|
|
5191
5224
|
getObject(arg0).headers = getObject(arg1);
|
|
5192
5225
|
};
|
|
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;
|
|
@@ -443,12 +450,12 @@ export const wasm_bindgen__convert__closures_____invoke__hdc41283f124c06e5: (
|
|
|
443
450
|
b: number,
|
|
444
451
|
c: number,
|
|
445
452
|
) => void;
|
|
446
|
-
export const wasm_bindgen__closure__destroy__h5bf455f3385c4f71: (a: number, b: number) => void;
|
|
447
453
|
export const wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e: (
|
|
448
454
|
a: number,
|
|
449
455
|
b: number,
|
|
450
456
|
) => void;
|
|
451
457
|
export const wasm_bindgen__closure__destroy__hfcb631b72e5e985c: (a: number, b: number) => void;
|
|
458
|
+
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,
|