@bitwarden/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.
@@ -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.
@@ -866,6 +866,10 @@ function wasm_bindgen__convert__closures_____invoke__hdc41283f124c06e5(arg0, arg
866
866
  );
867
867
  }
868
868
 
869
+ function wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e(arg0, arg1) {
870
+ wasm.wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e(arg0, arg1);
871
+ }
872
+
869
873
  function wasm_bindgen__convert__closures_____invoke__h1a8786b7bd5c2cf5(arg0, arg1, arg2) {
870
874
  try {
871
875
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
@@ -885,10 +889,6 @@ function wasm_bindgen__convert__closures_____invoke__h1a8786b7bd5c2cf5(arg0, arg
885
889
  }
886
890
  }
887
891
 
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,
@@ -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.__wbg_cipher_0196bd196ae59e2c = function (arg0) {
4502
+ exports.__wbg_cipher_c5d7f3af290bbbf4 = 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.__wbg_folder_7ad956677c62f008 = function (arg0) {
4595
+ exports.__wbg_folder_149190ff7ec60f4c = 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.__wbg_get_7775c3e3ae3bcefd = function () {
4622
+ exports.__wbg_get_3763d86f09fb65c6 = function () {
4590
4623
  return handleError(function (arg0, arg1, arg2) {
4591
4624
  let deferred0_0;
4592
4625
  let deferred0_1;
@@ -4606,19 +4639,7 @@ exports.__wbg_get_7bed016f185add81 = function (arg0, arg1) {
4606
4639
  return addHeapObject(ret);
4607
4640
  };
4608
4641
 
4609
- exports.__wbg_get_access_token_1de03e544708805a = function (arg0) {
4610
- const ret = getObject(arg0).get_access_token();
4611
- return addHeapObject(ret);
4612
- };
4613
-
4614
- exports.__wbg_get_efcb449f58ec27c2 = function () {
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_f836288e48750d27 = function () {
4642
+ exports.__wbg_get_97be5c58774542cd = function () {
4622
4643
  return handleError(function (arg0, arg1, arg2) {
4623
4644
  let deferred0_0;
4624
4645
  let deferred0_1;
@@ -4633,6 +4654,18 @@ exports.__wbg_get_f836288e48750d27 = function () {
4633
4654
  }, arguments);
4634
4655
  };
4635
4656
 
4657
+ exports.__wbg_get_access_token_afc3b106f073fd8e = function (arg0) {
4658
+ const ret = getObject(arg0).get_access_token();
4659
+ return addHeapObject(ret);
4660
+ };
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.__wbg_list_a25d56a0eba748af = function () {
4853
+ exports.__wbg_list_53991bc038506fbc = 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.__wbg_list_a618bae756003515 = function () {
4860
+ exports.__wbg_list_ff71f59ca6f21505 = 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.__wbg_remove_6e0b8907d2143b2a = function () {
5104
+ exports.__wbg_remove_a5d30e4a14a4441b = 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_6e0b8907d2143b2a = function () {
5083
5116
  }, arguments);
5084
5117
  };
5085
5118
 
5086
- exports.__wbg_remove_a3355f80824bccaa = function () {
5119
+ exports.__wbg_remove_e0d5d52e4d454588 = function () {
5087
5120
  return handleError(function (arg0, arg1, arg2) {
5088
5121
  let deferred0_0;
5089
5122
  let deferred0_1;
@@ -5129,11 +5162,7 @@ exports.__wbg_setTimeout_ca12ead8b48245e2 = function (arg0, arg1) {
5129
5162
  return addHeapObject(ret);
5130
5163
  };
5131
5164
 
5132
- exports.__wbg_set_3f1d0b984ed272ed = function (arg0, arg1, arg2) {
5133
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
5134
- };
5135
-
5136
- exports.__wbg_set_4f10240cec7c0329 = function () {
5165
+ exports.__wbg_set_2d0a9c1f306162b7 = function () {
5137
5166
  return handleError(function (arg0, arg1, arg2, arg3) {
5138
5167
  let deferred0_0;
5139
5168
  let deferred0_1;
@@ -5148,7 +5177,7 @@ exports.__wbg_set_4f10240cec7c0329 = function () {
5148
5177
  }, arguments);
5149
5178
  };
5150
5179
 
5151
- exports.__wbg_set_8bf42eeed138232a = function () {
5180
+ exports.__wbg_set_32ec33366f931747 = function () {
5152
5181
  return handleError(function (arg0, arg1, arg2, arg3) {
5153
5182
  let deferred0_0;
5154
5183
  let deferred0_1;
@@ -5163,6 +5192,10 @@ exports.__wbg_set_8bf42eeed138232a = function () {
5163
5192
  }, arguments);
5164
5193
  };
5165
5194
 
5195
+ exports.__wbg_set_3f1d0b984ed272ed = function (arg0, arg1, arg2) {
5196
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
5197
+ };
5198
+
5166
5199
  exports.__wbg_set_907fb406c34a251d = function (arg0, arg1, arg2) {
5167
5200
  const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
5168
5201
  return addHeapObject(ret);
@@ -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;
@@ -437,18 +444,18 @@ export const wasm_bindgen__convert__closures_____invoke__hdc41283f124c06e5: (
437
444
  c: number,
438
445
  ) => void;
439
446
  export const wasm_bindgen__closure__destroy__h1470697583ce3ba3: (a: number, b: number) => void;
440
- export const wasm_bindgen__convert__closures_____invoke__h1a8786b7bd5c2cf5: (
447
+ export const wasm_bindgen__closure__destroy__h5bf455f3385c4f71: (a: number, b: number) => void;
448
+ export const wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e: (
441
449
  a: number,
442
450
  b: number,
443
- c: number,
444
- d: number,
445
451
  ) => void;
446
- export const wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e: (
452
+ export const wasm_bindgen__closure__destroy__hfcb631b72e5e985c: (a: number, b: number) => void;
453
+ export const wasm_bindgen__convert__closures_____invoke__h1a8786b7bd5c2cf5: (
447
454
  a: number,
448
455
  b: number,
456
+ c: number,
457
+ d: number,
449
458
  ) => void;
450
- export const wasm_bindgen__closure__destroy__h5bf455f3385c4f71: (a: number, b: number) => void;
451
- 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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitwarden/sdk-internal",
3
- "version": "0.2.0-main.397",
3
+ "version": "0.2.0-main.399",
4
4
  "license": "GPL-3.0",
5
5
  "repository": {
6
6
  "type": "git",