@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.
@@ -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.
@@ -858,10 +858,6 @@ exports.isEncryptFileError = function (error) {
858
858
  }
859
859
  };
860
860
 
861
- function wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e(arg0, arg1) {
862
- wasm.wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e(arg0, arg1);
863
- }
864
-
865
861
  function wasm_bindgen__convert__closures_____invoke__hb0cefc4a47b27ccb(arg0, arg1, arg2) {
866
862
  wasm.wasm_bindgen__convert__closures_____invoke__hb0cefc4a47b27ccb(
867
863
  arg0,
@@ -889,6 +885,10 @@ function wasm_bindgen__convert__closures_____invoke__h59c036539ecefa06(arg0, arg
889
885
  }
890
886
  }
891
887
 
888
+ function wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e(arg0, arg1) {
889
+ wasm.wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e(arg0, arg1);
890
+ }
891
+
892
892
  function wasm_bindgen__convert__closures_____invoke__h43dfd80678632d6f(arg0, arg1, arg2, arg3) {
893
893
  wasm.wasm_bindgen__convert__closures_____invoke__h43dfd80678632d6f(
894
894
  arg0,
@@ -4122,6 +4122,39 @@ class PureCrypto {
4122
4122
  wasm.__wbindgen_add_to_stack_pointer(16);
4123
4123
  }
4124
4124
  }
4125
+ /**
4126
+ * Given an encrypted private RSA key and the symmetric key it is wrapped with, this returns
4127
+ * the corresponding public RSA key in DER format.
4128
+ * @param {string} encrypted_private_key
4129
+ * @param {Uint8Array} wrapping_key
4130
+ * @returns {Uint8Array}
4131
+ */
4132
+ static rsa_extract_public_key(encrypted_private_key, wrapping_key) {
4133
+ try {
4134
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4135
+ const ptr0 = passStringToWasm0(
4136
+ encrypted_private_key,
4137
+ wasm.__wbindgen_malloc,
4138
+ wasm.__wbindgen_realloc,
4139
+ );
4140
+ const len0 = WASM_VECTOR_LEN;
4141
+ const ptr1 = passArray8ToWasm0(wrapping_key, wasm.__wbindgen_malloc);
4142
+ const len1 = WASM_VECTOR_LEN;
4143
+ wasm.purecrypto_rsa_extract_public_key(retptr, ptr0, len0, ptr1, len1);
4144
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4145
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4146
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
4147
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
4148
+ if (r3) {
4149
+ throw takeObject(r2);
4150
+ }
4151
+ var v3 = getArrayU8FromWasm0(r0, r1).slice();
4152
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
4153
+ return v3;
4154
+ } finally {
4155
+ wasm.__wbindgen_add_to_stack_pointer(16);
4156
+ }
4157
+ }
4125
4158
  }
4126
4159
  if (Symbol.dispose) PureCrypto.prototype[Symbol.dispose] = PureCrypto.prototype.free;
4127
4160
 
@@ -4549,7 +4582,7 @@ exports.__wbg_call_e762c39fa8ea36bf = function () {
4549
4582
  }, arguments);
4550
4583
  };
4551
4584
 
4552
- exports.__wbg_cipher_0196bd196ae59e2c = function (arg0) {
4585
+ exports.__wbg_cipher_27b0aefec8023efb = function (arg0) {
4553
4586
  const ret = getObject(arg0).cipher;
4554
4587
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
4555
4588
  };
@@ -4642,7 +4675,7 @@ exports.__wbg_fetch_f8ba0e29a9d6de0d = function (arg0, arg1) {
4642
4675
  return addHeapObject(ret);
4643
4676
  };
4644
4677
 
4645
- exports.__wbg_folder_7ad956677c62f008 = function (arg0) {
4678
+ exports.__wbg_folder_d6a2d6a9d32f3686 = function (arg0) {
4646
4679
  const ret = getObject(arg0).folder;
4647
4680
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
4648
4681
  };
@@ -4669,7 +4702,7 @@ exports.__wbg_getTime_14776bfb48a1bff9 = function (arg0) {
4669
4702
  return ret;
4670
4703
  };
4671
4704
 
4672
- exports.__wbg_get_7775c3e3ae3bcefd = function () {
4705
+ exports.__wbg_get_70485431d7544ae5 = function () {
4673
4706
  return handleError(function (arg0, arg1, arg2) {
4674
4707
  let deferred0_0;
4675
4708
  let deferred0_1;
@@ -4689,19 +4722,12 @@ exports.__wbg_get_7bed016f185add81 = function (arg0, arg1) {
4689
4722
  return addHeapObject(ret);
4690
4723
  };
4691
4724
 
4692
- exports.__wbg_get_access_token_1de03e544708805a = function (arg0) {
4725
+ exports.__wbg_get_access_token_048717a0999058da = function (arg0) {
4693
4726
  const ret = getObject(arg0).get_access_token();
4694
4727
  return addHeapObject(ret);
4695
4728
  };
4696
4729
 
4697
- exports.__wbg_get_efcb449f58ec27c2 = function () {
4698
- return handleError(function (arg0, arg1) {
4699
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
4700
- return addHeapObject(ret);
4701
- }, arguments);
4702
- };
4703
-
4704
- exports.__wbg_get_f836288e48750d27 = function () {
4730
+ exports.__wbg_get_bd5598ce2fa61fe7 = function () {
4705
4731
  return handleError(function (arg0, arg1, arg2) {
4706
4732
  let deferred0_0;
4707
4733
  let deferred0_1;
@@ -4716,6 +4742,13 @@ exports.__wbg_get_f836288e48750d27 = function () {
4716
4742
  }, arguments);
4717
4743
  };
4718
4744
 
4745
+ exports.__wbg_get_efcb449f58ec27c2 = function () {
4746
+ return handleError(function (arg0, arg1) {
4747
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
4748
+ return addHeapObject(ret);
4749
+ }, arguments);
4750
+ };
4751
+
4719
4752
  exports.__wbg_get_with_ref_key_1dc361bd10053bfe = function (arg0, arg1) {
4720
4753
  const ret = getObject(arg0)[getObject(arg1)];
4721
4754
  return addHeapObject(ret);
@@ -4900,14 +4933,14 @@ exports.__wbg_length_cdd215e10d9dd507 = function (arg0) {
4900
4933
  return ret;
4901
4934
  };
4902
4935
 
4903
- exports.__wbg_list_a25d56a0eba748af = function () {
4936
+ exports.__wbg_list_4789a1cc32867476 = function () {
4904
4937
  return handleError(function (arg0) {
4905
4938
  const ret = getObject(arg0).list();
4906
4939
  return addHeapObject(ret);
4907
4940
  }, arguments);
4908
4941
  };
4909
4942
 
4910
- exports.__wbg_list_a618bae756003515 = function () {
4943
+ exports.__wbg_list_65a7f325af23cc73 = function () {
4911
4944
  return handleError(function (arg0) {
4912
4945
  const ret = getObject(arg0).list();
4913
4946
  return addHeapObject(ret);
@@ -5151,7 +5184,7 @@ exports.__wbg_randomFillSync_ac0988aba3254290 = function () {
5151
5184
  }, arguments);
5152
5185
  };
5153
5186
 
5154
- exports.__wbg_remove_6e0b8907d2143b2a = function () {
5187
+ exports.__wbg_remove_0825e8a0ec895d58 = function () {
5155
5188
  return handleError(function (arg0, arg1, arg2) {
5156
5189
  let deferred0_0;
5157
5190
  let deferred0_1;
@@ -5166,7 +5199,7 @@ exports.__wbg_remove_6e0b8907d2143b2a = function () {
5166
5199
  }, arguments);
5167
5200
  };
5168
5201
 
5169
- exports.__wbg_remove_a3355f80824bccaa = function () {
5202
+ exports.__wbg_remove_ce09ed4fa7b19fbf = function () {
5170
5203
  return handleError(function (arg0, arg1, arg2) {
5171
5204
  let deferred0_0;
5172
5205
  let deferred0_1;
@@ -5216,7 +5249,31 @@ exports.__wbg_set_3f1d0b984ed272ed = function (arg0, arg1, arg2) {
5216
5249
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
5217
5250
  };
5218
5251
 
5219
- exports.__wbg_set_4f10240cec7c0329 = function () {
5252
+ exports.__wbg_set_907fb406c34a251d = function (arg0, arg1, arg2) {
5253
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
5254
+ return addHeapObject(ret);
5255
+ };
5256
+
5257
+ exports.__wbg_set_body_3c365989753d61f4 = function (arg0, arg1) {
5258
+ getObject(arg0).body = getObject(arg1);
5259
+ };
5260
+
5261
+ exports.__wbg_set_c213c871859d6500 = function (arg0, arg1, arg2) {
5262
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
5263
+ };
5264
+
5265
+ exports.__wbg_set_c2abbebe8b9ebee1 = function () {
5266
+ return handleError(function (arg0, arg1, arg2) {
5267
+ const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
5268
+ return ret;
5269
+ }, arguments);
5270
+ };
5271
+
5272
+ exports.__wbg_set_credentials_f621cd2d85c0c228 = function (arg0, arg1) {
5273
+ getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
5274
+ };
5275
+
5276
+ exports.__wbg_set_e12e8ea9f0a95d29 = function () {
5220
5277
  return handleError(function (arg0, arg1, arg2, arg3) {
5221
5278
  let deferred0_0;
5222
5279
  let deferred0_1;
@@ -5231,7 +5288,7 @@ exports.__wbg_set_4f10240cec7c0329 = function () {
5231
5288
  }, arguments);
5232
5289
  };
5233
5290
 
5234
- exports.__wbg_set_8bf42eeed138232a = function () {
5291
+ exports.__wbg_set_e4af713e5ff898d5 = function () {
5235
5292
  return handleError(function (arg0, arg1, arg2, arg3) {
5236
5293
  let deferred0_0;
5237
5294
  let deferred0_1;
@@ -5246,30 +5303,6 @@ exports.__wbg_set_8bf42eeed138232a = function () {
5246
5303
  }, arguments);
5247
5304
  };
5248
5305
 
5249
- exports.__wbg_set_907fb406c34a251d = function (arg0, arg1, arg2) {
5250
- const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
5251
- return addHeapObject(ret);
5252
- };
5253
-
5254
- exports.__wbg_set_body_3c365989753d61f4 = function (arg0, arg1) {
5255
- getObject(arg0).body = getObject(arg1);
5256
- };
5257
-
5258
- exports.__wbg_set_c213c871859d6500 = function (arg0, arg1, arg2) {
5259
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
5260
- };
5261
-
5262
- exports.__wbg_set_c2abbebe8b9ebee1 = function () {
5263
- return handleError(function (arg0, arg1, arg2) {
5264
- const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
5265
- return ret;
5266
- }, arguments);
5267
- };
5268
-
5269
- exports.__wbg_set_credentials_f621cd2d85c0c228 = function (arg0, arg1) {
5270
- getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
5271
- };
5272
-
5273
5306
  exports.__wbg_set_headers_6926da238cd32ee4 = function (arg0, arg1) {
5274
5307
  getObject(arg0).headers = getObject(arg1);
5275
5308
  };
@@ -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,24 +442,24 @@ 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 wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e: (
445
+ export const wasm_bindgen__convert__closures_____invoke__hb0cefc4a47b27ccb: (
439
446
  a: number,
440
447
  b: number,
448
+ c: number,
441
449
  ) => void;
442
- export const wasm_bindgen__closure__destroy__hfcb631b72e5e985c: (a: number, b: number) => void;
443
450
  export const wasm_bindgen__closure__destroy__h5bf455f3385c4f71: (a: number, b: number) => void;
444
- export const wasm_bindgen__convert__closures_____invoke__hb0cefc4a47b27ccb: (
451
+ export const wasm_bindgen__convert__closures_____invoke__h59c036539ecefa06: (
445
452
  a: number,
446
453
  b: number,
447
454
  c: number,
455
+ d: number,
448
456
  ) => void;
449
457
  export const wasm_bindgen__closure__destroy__hd2baf0154e030ab9: (a: number, b: number) => void;
450
- export const wasm_bindgen__convert__closures_____invoke__h59c036539ecefa06: (
458
+ export const wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e: (
451
459
  a: number,
452
460
  b: number,
453
- c: number,
454
- d: number,
455
461
  ) => void;
462
+ 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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitwarden/commercial-sdk-internal",
3
- "version": "0.2.0-main.397",
3
+ "version": "0.2.0-main.398",
4
4
  "license": "BITWARDEN SOFTWARE DEVELOPMENT KIT LICENSE AGREEMENT",
5
5
  "repository": {
6
6
  "type": "git",