@bitwarden/sdk-internal 0.2.0-main.402 → 0.2.0-main.404

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.
@@ -115,6 +115,12 @@ export enum LoginLinkedIdType {
115
115
  Username = 100,
116
116
  Password = 101,
117
117
  }
118
+ export enum RsaError {
119
+ Decryption = 0,
120
+ Encryption = 1,
121
+ KeyParse = 2,
122
+ KeySerialize = 3,
123
+ }
118
124
  export enum SecureNoteType {
119
125
  Generic = 0,
120
126
  }
@@ -2424,13 +2430,22 @@ export class PureCrypto {
2424
2430
  master_key: Uint8Array,
2425
2431
  ): Uint8Array;
2426
2432
  /**
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.
2433
+ * Given a decrypted private RSA key PKCS8 DER this
2434
+ * returns the corresponding public RSA key in DER format.
2429
2435
  */
2430
- static rsa_extract_public_key(
2431
- encrypted_private_key: string,
2432
- wrapping_key: Uint8Array,
2433
- ): Uint8Array;
2436
+ static rsa_extract_public_key(private_key: Uint8Array): Uint8Array;
2437
+ /**
2438
+ * Generates a new RSA key pair and returns the private key
2439
+ */
2440
+ static rsa_generate_keypair(): Uint8Array;
2441
+ /**
2442
+ * Decrypts data using RSAES-OAEP with SHA-1
2443
+ */
2444
+ static rsa_decrypt_data(encrypted_data: Uint8Array, private_key: Uint8Array): Uint8Array;
2445
+ /**
2446
+ * Encrypts data using RSAES-OAEP with SHA-1
2447
+ */
2448
+ static rsa_encrypt_data(plain_data: Uint8Array, public_key: Uint8Array): Uint8Array;
2434
2449
  }
2435
2450
  /**
2436
2451
  * The `SendAccessClient` is used to interact with the Bitwarden API to get send access tokens.
@@ -858,14 +858,22 @@ exports.isEncryptFileError = function (error) {
858
858
  }
859
859
  };
860
860
 
861
+ function wasm_bindgen__convert__closures_____invoke__h5c75b123e343f7aa(arg0, arg1, arg2) {
862
+ wasm.wasm_bindgen__convert__closures_____invoke__h5c75b123e343f7aa(
863
+ arg0,
864
+ arg1,
865
+ addHeapObject(arg2),
866
+ );
867
+ }
868
+
861
869
  function wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e(arg0, arg1) {
862
870
  wasm.wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e(arg0, arg1);
863
871
  }
864
872
 
865
- function wasm_bindgen__convert__closures_____invoke__h1a8786b7bd5c2cf5(arg0, arg1, arg2) {
873
+ function wasm_bindgen__convert__closures_____invoke__hb20fdca52a2a2cdf(arg0, arg1, arg2) {
866
874
  try {
867
875
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
868
- wasm.wasm_bindgen__convert__closures_____invoke__h1a8786b7bd5c2cf5(
876
+ wasm.wasm_bindgen__convert__closures_____invoke__hb20fdca52a2a2cdf(
869
877
  retptr,
870
878
  arg0,
871
879
  arg1,
@@ -881,14 +889,6 @@ function wasm_bindgen__convert__closures_____invoke__h1a8786b7bd5c2cf5(arg0, arg
881
889
  }
882
890
  }
883
891
 
884
- function wasm_bindgen__convert__closures_____invoke__hdc41283f124c06e5(arg0, arg1, arg2) {
885
- wasm.wasm_bindgen__convert__closures_____invoke__hdc41283f124c06e5(
886
- arg0,
887
- arg1,
888
- addHeapObject(arg2),
889
- );
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,
@@ -1032,6 +1032,19 @@ exports.LoginLinkedIdType = Object.freeze({
1032
1032
  Password: 101,
1033
1033
  101: "Password",
1034
1034
  });
1035
+ /**
1036
+ * @enum {0 | 1 | 2 | 3}
1037
+ */
1038
+ exports.RsaError = Object.freeze({
1039
+ Decryption: 0,
1040
+ 0: "Decryption",
1041
+ Encryption: 1,
1042
+ 1: "Encryption",
1043
+ KeyParse: 2,
1044
+ 2: "KeyParse",
1045
+ KeySerialize: 3,
1046
+ 3: "KeySerialize",
1047
+ });
1035
1048
  /**
1036
1049
  * @enum {0}
1037
1050
  */
@@ -4040,24 +4053,95 @@ class PureCrypto {
4040
4053
  }
4041
4054
  }
4042
4055
  /**
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
4056
+ * Given a decrypted private RSA key PKCS8 DER this
4057
+ * returns the corresponding public RSA key in DER format.
4058
+ * @param {Uint8Array} private_key
4047
4059
  * @returns {Uint8Array}
4048
4060
  */
4049
- static rsa_extract_public_key(encrypted_private_key, wrapping_key) {
4061
+ static rsa_extract_public_key(private_key) {
4050
4062
  try {
4051
4063
  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
- );
4064
+ const ptr0 = passArray8ToWasm0(private_key, wasm.__wbindgen_malloc);
4057
4065
  const len0 = WASM_VECTOR_LEN;
4058
- const ptr1 = passArray8ToWasm0(wrapping_key, wasm.__wbindgen_malloc);
4066
+ wasm.purecrypto_rsa_extract_public_key(retptr, ptr0, len0);
4067
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4068
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4069
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
4070
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
4071
+ if (r3) {
4072
+ throw takeObject(r2);
4073
+ }
4074
+ var v2 = getArrayU8FromWasm0(r0, r1).slice();
4075
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
4076
+ return v2;
4077
+ } finally {
4078
+ wasm.__wbindgen_add_to_stack_pointer(16);
4079
+ }
4080
+ }
4081
+ /**
4082
+ * Generates a new RSA key pair and returns the private key
4083
+ * @returns {Uint8Array}
4084
+ */
4085
+ static rsa_generate_keypair() {
4086
+ try {
4087
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4088
+ wasm.purecrypto_rsa_generate_keypair(retptr);
4089
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4090
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4091
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
4092
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
4093
+ if (r3) {
4094
+ throw takeObject(r2);
4095
+ }
4096
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
4097
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
4098
+ return v1;
4099
+ } finally {
4100
+ wasm.__wbindgen_add_to_stack_pointer(16);
4101
+ }
4102
+ }
4103
+ /**
4104
+ * Decrypts data using RSAES-OAEP with SHA-1
4105
+ * @param {Uint8Array} encrypted_data
4106
+ * @param {Uint8Array} private_key
4107
+ * @returns {Uint8Array}
4108
+ */
4109
+ static rsa_decrypt_data(encrypted_data, private_key) {
4110
+ try {
4111
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4112
+ const ptr0 = passArray8ToWasm0(encrypted_data, wasm.__wbindgen_malloc);
4113
+ const len0 = WASM_VECTOR_LEN;
4114
+ const ptr1 = passArray8ToWasm0(private_key, wasm.__wbindgen_malloc);
4115
+ const len1 = WASM_VECTOR_LEN;
4116
+ wasm.purecrypto_rsa_decrypt_data(retptr, ptr0, len0, ptr1, len1);
4117
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4118
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4119
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
4120
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
4121
+ if (r3) {
4122
+ throw takeObject(r2);
4123
+ }
4124
+ var v3 = getArrayU8FromWasm0(r0, r1).slice();
4125
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
4126
+ return v3;
4127
+ } finally {
4128
+ wasm.__wbindgen_add_to_stack_pointer(16);
4129
+ }
4130
+ }
4131
+ /**
4132
+ * Encrypts data using RSAES-OAEP with SHA-1
4133
+ * @param {Uint8Array} plain_data
4134
+ * @param {Uint8Array} public_key
4135
+ * @returns {Uint8Array}
4136
+ */
4137
+ static rsa_encrypt_data(plain_data, public_key) {
4138
+ try {
4139
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4140
+ const ptr0 = passArray8ToWasm0(plain_data, wasm.__wbindgen_malloc);
4141
+ const len0 = WASM_VECTOR_LEN;
4142
+ const ptr1 = passArray8ToWasm0(public_key, wasm.__wbindgen_malloc);
4059
4143
  const len1 = WASM_VECTOR_LEN;
4060
- wasm.purecrypto_rsa_extract_public_key(retptr, ptr0, len0, ptr1, len1);
4144
+ wasm.purecrypto_rsa_encrypt_data(retptr, ptr0, len0, ptr1, len1);
4061
4145
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4062
4146
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4063
4147
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -4499,7 +4583,7 @@ exports.__wbg_call_e762c39fa8ea36bf = function () {
4499
4583
  }, arguments);
4500
4584
  };
4501
4585
 
4502
- exports.__wbg_cipher_ed16a34ea24872d4 = function (arg0) {
4586
+ exports.__wbg_cipher_a69755738b4a95e4 = function (arg0) {
4503
4587
  const ret = getObject(arg0).cipher;
4504
4588
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
4505
4589
  };
@@ -4592,7 +4676,7 @@ exports.__wbg_fetch_f8ba0e29a9d6de0d = function (arg0, arg1) {
4592
4676
  return addHeapObject(ret);
4593
4677
  };
4594
4678
 
4595
- exports.__wbg_folder_0b0299bd1cc85c67 = function (arg0) {
4679
+ exports.__wbg_folder_6ddccfa2359908cd = function (arg0) {
4596
4680
  const ret = getObject(arg0).folder;
4597
4681
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
4598
4682
  };
@@ -4608,6 +4692,12 @@ exports.__wbg_getRandomValues_38097e921c2494c3 = function () {
4608
4692
  }, arguments);
4609
4693
  };
4610
4694
 
4695
+ exports.__wbg_getRandomValues_3c9c0d586e575a16 = function () {
4696
+ return handleError(function (arg0, arg1) {
4697
+ globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
4698
+ }, arguments);
4699
+ };
4700
+
4611
4701
  exports.__wbg_getRandomValues_b8f5dbd5f3995a9e = function () {
4612
4702
  return handleError(function (arg0, arg1) {
4613
4703
  getObject(arg0).getRandomValues(getObject(arg1));
@@ -4619,7 +4709,7 @@ exports.__wbg_getTime_14776bfb48a1bff9 = function (arg0) {
4619
4709
  return ret;
4620
4710
  };
4621
4711
 
4622
- exports.__wbg_get_4c60beeeb1154fc2 = function () {
4712
+ exports.__wbg_get_63fc1a87cfa05664 = function () {
4623
4713
  return handleError(function (arg0, arg1, arg2) {
4624
4714
  let deferred0_0;
4625
4715
  let deferred0_1;
@@ -4634,7 +4724,12 @@ exports.__wbg_get_4c60beeeb1154fc2 = function () {
4634
4724
  }, arguments);
4635
4725
  };
4636
4726
 
4637
- exports.__wbg_get_756969d3b9917d61 = function () {
4727
+ exports.__wbg_get_7bed016f185add81 = function (arg0, arg1) {
4728
+ const ret = getObject(arg0)[arg1 >>> 0];
4729
+ return addHeapObject(ret);
4730
+ };
4731
+
4732
+ exports.__wbg_get_7f59e4189b579885 = function () {
4638
4733
  return handleError(function (arg0, arg1, arg2) {
4639
4734
  let deferred0_0;
4640
4735
  let deferred0_1;
@@ -4649,12 +4744,7 @@ exports.__wbg_get_756969d3b9917d61 = function () {
4649
4744
  }, arguments);
4650
4745
  };
4651
4746
 
4652
- exports.__wbg_get_7bed016f185add81 = function (arg0, arg1) {
4653
- const ret = getObject(arg0)[arg1 >>> 0];
4654
- return addHeapObject(ret);
4655
- };
4656
-
4657
- exports.__wbg_get_access_token_7db381e38e606e59 = function (arg0) {
4747
+ exports.__wbg_get_access_token_5d1676f62fd8cd77 = function (arg0) {
4658
4748
  const ret = getObject(arg0).get_access_token();
4659
4749
  return addHeapObject(ret);
4660
4750
  };
@@ -4850,14 +4940,14 @@ exports.__wbg_length_cdd215e10d9dd507 = function (arg0) {
4850
4940
  return ret;
4851
4941
  };
4852
4942
 
4853
- exports.__wbg_list_3845e5691ae026d3 = function () {
4943
+ exports.__wbg_list_2aa62e3f6d399917 = function () {
4854
4944
  return handleError(function (arg0) {
4855
4945
  const ret = getObject(arg0).list();
4856
4946
  return addHeapObject(ret);
4857
4947
  }, arguments);
4858
4948
  };
4859
4949
 
4860
- exports.__wbg_list_b4e456c48b5b30f2 = function () {
4950
+ exports.__wbg_list_3b311a5af885ff76 = function () {
4861
4951
  return handleError(function (arg0) {
4862
4952
  const ret = getObject(arg0).list();
4863
4953
  return addHeapObject(ret);
@@ -5101,7 +5191,7 @@ exports.__wbg_randomFillSync_ac0988aba3254290 = function () {
5101
5191
  }, arguments);
5102
5192
  };
5103
5193
 
5104
- exports.__wbg_remove_2008f1dde7b91f51 = function () {
5194
+ exports.__wbg_remove_47756c4838416808 = function () {
5105
5195
  return handleError(function (arg0, arg1, arg2) {
5106
5196
  let deferred0_0;
5107
5197
  let deferred0_1;
@@ -5116,7 +5206,7 @@ exports.__wbg_remove_2008f1dde7b91f51 = function () {
5116
5206
  }, arguments);
5117
5207
  };
5118
5208
 
5119
- exports.__wbg_remove_bfbaa9c2aacce2f3 = function () {
5209
+ exports.__wbg_remove_e8858f2fbc02dbd1 = function () {
5120
5210
  return handleError(function (arg0, arg1, arg2) {
5121
5211
  let deferred0_0;
5122
5212
  let deferred0_1;
@@ -5162,11 +5252,7 @@ exports.__wbg_setTimeout_ca12ead8b48245e2 = function (arg0, arg1) {
5162
5252
  return addHeapObject(ret);
5163
5253
  };
5164
5254
 
5165
- exports.__wbg_set_3f1d0b984ed272ed = function (arg0, arg1, arg2) {
5166
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
5167
- };
5168
-
5169
- exports.__wbg_set_512ce00f6a1a36e7 = function () {
5255
+ exports.__wbg_set_268d54f279c675e3 = function () {
5170
5256
  return handleError(function (arg0, arg1, arg2, arg3) {
5171
5257
  let deferred0_0;
5172
5258
  let deferred0_1;
@@ -5181,12 +5267,11 @@ exports.__wbg_set_512ce00f6a1a36e7 = function () {
5181
5267
  }, arguments);
5182
5268
  };
5183
5269
 
5184
- exports.__wbg_set_907fb406c34a251d = function (arg0, arg1, arg2) {
5185
- const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
5186
- return addHeapObject(ret);
5270
+ exports.__wbg_set_3f1d0b984ed272ed = function (arg0, arg1, arg2) {
5271
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
5187
5272
  };
5188
5273
 
5189
- exports.__wbg_set_b17bc1811a1e440e = function () {
5274
+ exports.__wbg_set_6e08863f9db5b0dc = function () {
5190
5275
  return handleError(function (arg0, arg1, arg2, arg3) {
5191
5276
  let deferred0_0;
5192
5277
  let deferred0_1;
@@ -5201,6 +5286,11 @@ exports.__wbg_set_b17bc1811a1e440e = function () {
5201
5286
  }, arguments);
5202
5287
  };
5203
5288
 
5289
+ exports.__wbg_set_907fb406c34a251d = function (arg0, arg1, arg2) {
5290
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
5291
+ return addHeapObject(ret);
5292
+ };
5293
+
5204
5294
  exports.__wbg_set_body_3c365989753d61f4 = function (arg0, arg1) {
5205
5295
  getObject(arg0).body = getObject(arg1);
5206
5296
  };
@@ -5384,39 +5474,31 @@ exports.__wbg_warn_8f5b5437666d0885 = function (arg0, arg1, arg2, arg3) {
5384
5474
  console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
5385
5475
  };
5386
5476
 
5387
- exports.__wbindgen_cast_1e9dc1058b799ead = function (arg0, arg1) {
5388
- // Cast intrinsic for `Closure(Closure { dtor_idx: 41, function: Function { arguments: [NamedExternref("IDBVersionChangeEvent")], shim_idx: 42, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
5477
+ exports.__wbindgen_cast_2241b6af4c4b2941 = function (arg0, arg1) {
5478
+ // Cast intrinsic for `Ref(String) -> Externref`.
5479
+ const ret = getStringFromWasm0(arg0, arg1);
5480
+ return addHeapObject(ret);
5481
+ };
5482
+
5483
+ exports.__wbindgen_cast_4042b341512ce63a = function (arg0, arg1) {
5484
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 41, function: Function { arguments: [NamedExternref("IDBVersionChangeEvent")], shim_idx: 44, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
5389
5485
  const ret = makeMutClosure(
5390
5486
  arg0,
5391
5487
  arg1,
5392
- wasm.wasm_bindgen__closure__destroy__h1470697583ce3ba3,
5393
- wasm_bindgen__convert__closures_____invoke__hdc41283f124c06e5,
5488
+ wasm.wasm_bindgen__closure__destroy__h09d4e676b918dc23,
5489
+ wasm_bindgen__convert__closures_____invoke__h5c75b123e343f7aa,
5394
5490
  );
5395
5491
  return addHeapObject(ret);
5396
5492
  };
5397
5493
 
5398
- exports.__wbindgen_cast_2241b6af4c4b2941 = function (arg0, arg1) {
5399
- // Cast intrinsic for `Ref(String) -> Externref`.
5400
- const ret = getStringFromWasm0(arg0, arg1);
5401
- return addHeapObject(ret);
5402
- };
5403
-
5404
5494
  exports.__wbindgen_cast_4625c577ab2ec9ee = function (arg0) {
5405
5495
  // Cast intrinsic for `U64 -> Externref`.
5406
5496
  const ret = BigInt.asUintN(64, arg0);
5407
5497
  return addHeapObject(ret);
5408
5498
  };
5409
5499
 
5410
- exports.__wbindgen_cast_5fea77eff9dd275c = function (arg0, arg1) {
5411
- var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
5412
- wasm.__wbindgen_free(arg0, arg1 * 4, 4);
5413
- // Cast intrinsic for `Vector(NamedExternref("CipherRiskResult")) -> Externref`.
5414
- const ret = v0;
5415
- return addHeapObject(ret);
5416
- };
5417
-
5418
- exports.__wbindgen_cast_6b441f2e42512d6e = function (arg0, arg1) {
5419
- // Cast intrinsic for `Closure(Closure { dtor_idx: 545, function: Function { arguments: [], shim_idx: 299, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
5500
+ exports.__wbindgen_cast_567ce6425eb96825 = function (arg0, arg1) {
5501
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 551, function: Function { arguments: [], shim_idx: 305, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
5420
5502
  const ret = makeMutClosure(
5421
5503
  arg0,
5422
5504
  arg1,
@@ -5426,6 +5508,14 @@ exports.__wbindgen_cast_6b441f2e42512d6e = function (arg0, arg1) {
5426
5508
  return addHeapObject(ret);
5427
5509
  };
5428
5510
 
5511
+ exports.__wbindgen_cast_5fea77eff9dd275c = function (arg0, arg1) {
5512
+ var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
5513
+ wasm.__wbindgen_free(arg0, arg1 * 4, 4);
5514
+ // Cast intrinsic for `Vector(NamedExternref("CipherRiskResult")) -> Externref`.
5515
+ const ret = v0;
5516
+ return addHeapObject(ret);
5517
+ };
5518
+
5429
5519
  exports.__wbindgen_cast_7a6d185652cd8149 = function (arg0, arg1) {
5430
5520
  var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
5431
5521
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
@@ -5434,54 +5524,54 @@ exports.__wbindgen_cast_7a6d185652cd8149 = function (arg0, arg1) {
5434
5524
  return addHeapObject(ret);
5435
5525
  };
5436
5526
 
5437
- exports.__wbindgen_cast_9ae0607507abb057 = function (arg0) {
5438
- // Cast intrinsic for `I64 -> Externref`.
5439
- const ret = arg0;
5527
+ exports.__wbindgen_cast_8340b5b160d85933 = function (arg0, arg1) {
5528
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 304, function: Function { arguments: [], shim_idx: 305, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
5529
+ const ret = makeMutClosure(
5530
+ arg0,
5531
+ arg1,
5532
+ wasm.wasm_bindgen__closure__destroy__h5bf455f3385c4f71,
5533
+ wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e,
5534
+ );
5440
5535
  return addHeapObject(ret);
5441
5536
  };
5442
5537
 
5443
- exports.__wbindgen_cast_c5e8bf91c85dc4ef = function (arg0, arg1) {
5444
- // Cast intrinsic for `Closure(Closure { dtor_idx: 298, function: Function { arguments: [Externref], shim_idx: 42, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
5538
+ exports.__wbindgen_cast_9654b59eb60e619d = function (arg0, arg1) {
5539
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 304, function: Function { arguments: [Externref], shim_idx: 44, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
5445
5540
  const ret = makeMutClosure(
5446
5541
  arg0,
5447
5542
  arg1,
5448
5543
  wasm.wasm_bindgen__closure__destroy__h5bf455f3385c4f71,
5449
- wasm_bindgen__convert__closures_____invoke__hdc41283f124c06e5,
5544
+ wasm_bindgen__convert__closures_____invoke__h5c75b123e343f7aa,
5450
5545
  );
5451
5546
  return addHeapObject(ret);
5452
5547
  };
5453
5548
 
5454
- exports.__wbindgen_cast_cb9088102bce6b30 = function (arg0, arg1) {
5455
- // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
5456
- const ret = getArrayU8FromWasm0(arg0, arg1);
5549
+ exports.__wbindgen_cast_9ae0607507abb057 = function (arg0) {
5550
+ // Cast intrinsic for `I64 -> Externref`.
5551
+ const ret = arg0;
5457
5552
  return addHeapObject(ret);
5458
5553
  };
5459
5554
 
5460
- exports.__wbindgen_cast_d6cd19b81560fd6e = function (arg0) {
5461
- // Cast intrinsic for `F64 -> Externref`.
5462
- const ret = arg0;
5555
+ exports.__wbindgen_cast_cb9088102bce6b30 = function (arg0, arg1) {
5556
+ // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
5557
+ const ret = getArrayU8FromWasm0(arg0, arg1);
5463
5558
  return addHeapObject(ret);
5464
5559
  };
5465
5560
 
5466
- exports.__wbindgen_cast_d87bfd09ab1288e4 = function (arg0, arg1) {
5467
- // Cast intrinsic for `Closure(Closure { dtor_idx: 298, function: Function { arguments: [], shim_idx: 299, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
5561
+ exports.__wbindgen_cast_d49c305f67640cb1 = function (arg0, arg1) {
5562
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 41, function: Function { arguments: [NamedExternref("Event")], shim_idx: 42, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
5468
5563
  const ret = makeMutClosure(
5469
5564
  arg0,
5470
5565
  arg1,
5471
- wasm.wasm_bindgen__closure__destroy__h5bf455f3385c4f71,
5472
- wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e,
5566
+ wasm.wasm_bindgen__closure__destroy__h09d4e676b918dc23,
5567
+ wasm_bindgen__convert__closures_____invoke__hb20fdca52a2a2cdf,
5473
5568
  );
5474
5569
  return addHeapObject(ret);
5475
5570
  };
5476
5571
 
5477
- exports.__wbindgen_cast_daac1d8e48fc3ba0 = function (arg0, arg1) {
5478
- // Cast intrinsic for `Closure(Closure { dtor_idx: 41, function: Function { arguments: [NamedExternref("Event")], shim_idx: 44, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
5479
- const ret = makeMutClosure(
5480
- arg0,
5481
- arg1,
5482
- wasm.wasm_bindgen__closure__destroy__h1470697583ce3ba3,
5483
- wasm_bindgen__convert__closures_____invoke__h1a8786b7bd5c2cf5,
5484
- );
5572
+ exports.__wbindgen_cast_d6cd19b81560fd6e = function (arg0) {
5573
+ // Cast intrinsic for `F64 -> Externref`.
5574
+ const ret = arg0;
5485
5575
  return addHeapObject(ret);
5486
5576
  };
5487
5577
 
@@ -177,7 +177,16 @@ 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: (
180
+ export const purecrypto_rsa_extract_public_key: (a: number, b: number, c: number) => void;
181
+ export const purecrypto_rsa_generate_keypair: (a: number) => void;
182
+ export const purecrypto_rsa_decrypt_data: (
183
+ a: number,
184
+ b: number,
185
+ c: number,
186
+ d: number,
187
+ e: number,
188
+ ) => void;
189
+ export const purecrypto_rsa_encrypt_data: (
181
190
  a: number,
182
191
  b: number,
183
192
  c: number,
@@ -438,23 +447,23 @@ export const __wbg_totpclient_free: (a: number, b: number) => void;
438
447
  export const __wbg_get_outgoingmessage_destination: (a: number) => number;
439
448
  export const __wbg_set_outgoingmessage_destination: (a: number, b: number) => void;
440
449
  export const __wbg_cryptoclient_free: (a: number, b: number) => void;
441
- export const wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e: (
450
+ export const wasm_bindgen__convert__closures_____invoke__h5c75b123e343f7aa: (
442
451
  a: number,
443
452
  b: number,
453
+ c: number,
444
454
  ) => void;
445
- export const wasm_bindgen__closure__destroy__hfcb631b72e5e985c: (a: number, b: number) => void;
446
- export const wasm_bindgen__convert__closures_____invoke__h1a8786b7bd5c2cf5: (
455
+ export const wasm_bindgen__closure__destroy__h09d4e676b918dc23: (a: number, b: number) => void;
456
+ export const wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e: (
447
457
  a: number,
448
458
  b: number,
449
- c: number,
450
- d: number,
451
459
  ) => void;
452
- export const wasm_bindgen__closure__destroy__h1470697583ce3ba3: (a: number, b: number) => void;
460
+ export const wasm_bindgen__closure__destroy__hfcb631b72e5e985c: (a: number, b: number) => void;
453
461
  export const wasm_bindgen__closure__destroy__h5bf455f3385c4f71: (a: number, b: number) => void;
454
- export const wasm_bindgen__convert__closures_____invoke__hdc41283f124c06e5: (
462
+ export const wasm_bindgen__convert__closures_____invoke__hb20fdca52a2a2cdf: (
455
463
  a: number,
456
464
  b: number,
457
465
  c: number,
466
+ d: number,
458
467
  ) => void;
459
468
  export const wasm_bindgen__convert__closures_____invoke__h43dfd80678632d6f: (
460
469
  a: number,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitwarden/sdk-internal",
3
- "version": "0.2.0-main.402",
3
+ "version": "0.2.0-main.404",
4
4
  "license": "GPL-3.0",
5
5
  "repository": {
6
6
  "type": "git",