@bitwarden/sdk-internal 0.2.0-main.543 → 0.2.0-main.544

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 CHANGED
@@ -1 +1 @@
1
- d056888e310db07453ecb06ade32d43af5a050b9
1
+ 4ffddfe5fb69d3e93d110b4dda9db4ccd017b203
@@ -2955,6 +2955,11 @@ export class PureCrypto {
2955
2955
  private constructor();
2956
2956
  free(): void;
2957
2957
  [Symbol.dispose](): void;
2958
+ /**
2959
+ * Generates a cryptographically secure random number between the given min and max
2960
+ * (inclusive).
2961
+ */
2962
+ static random_number(min: number, max: number): number;
2958
2963
  /**
2959
2964
  * Decrypts data using RSAES-OAEP with SHA-1
2960
2965
  * HAZMAT WARNING: Do not use outside of implementing cryptofunctionservice
@@ -1051,6 +1051,14 @@ export function isGetFolderError(error) {
1051
1051
  }
1052
1052
  }
1053
1053
 
1054
+ function wasm_bindgen__convert__closures_____invoke__h05f50e601cb9cbc9(arg0, arg1, arg2) {
1055
+ wasm.wasm_bindgen__convert__closures_____invoke__h05f50e601cb9cbc9(arg0, arg1, addHeapObject(arg2));
1056
+ }
1057
+
1058
+ function wasm_bindgen__convert__closures_____invoke__h7c6e0808d83e1743(arg0, arg1) {
1059
+ wasm.wasm_bindgen__convert__closures_____invoke__h7c6e0808d83e1743(arg0, arg1);
1060
+ }
1061
+
1054
1062
  function wasm_bindgen__convert__closures_____invoke__hf245910ad5d68b6c(arg0, arg1, arg2) {
1055
1063
  try {
1056
1064
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
@@ -1065,14 +1073,6 @@ function wasm_bindgen__convert__closures_____invoke__hf245910ad5d68b6c(arg0, arg
1065
1073
  }
1066
1074
  }
1067
1075
 
1068
- function wasm_bindgen__convert__closures_____invoke__h7c6e0808d83e1743(arg0, arg1) {
1069
- wasm.wasm_bindgen__convert__closures_____invoke__h7c6e0808d83e1743(arg0, arg1);
1070
- }
1071
-
1072
- function wasm_bindgen__convert__closures_____invoke__h05f50e601cb9cbc9(arg0, arg1, arg2) {
1073
- wasm.wasm_bindgen__convert__closures_____invoke__h05f50e601cb9cbc9(arg0, arg1, addHeapObject(arg2));
1074
- }
1075
-
1076
1076
  function wasm_bindgen__convert__closures_____invoke__hc4d57ad329cc6f58(arg0, arg1, arg2, arg3) {
1077
1077
  wasm.wasm_bindgen__convert__closures_____invoke__hc4d57ad329cc6f58(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
1078
1078
  }
@@ -3525,6 +3525,17 @@ export class PureCrypto {
3525
3525
  const ptr = this.__destroy_into_raw();
3526
3526
  wasm.__wbg_purecrypto_free(ptr, 0);
3527
3527
  }
3528
+ /**
3529
+ * Generates a cryptographically secure random number between the given min and max
3530
+ * (inclusive).
3531
+ * @param {number} min
3532
+ * @param {number} max
3533
+ * @returns {number}
3534
+ */
3535
+ static random_number(min, max) {
3536
+ const ret = wasm.purecrypto_random_number(min, max);
3537
+ return ret >>> 0;
3538
+ }
3528
3539
  /**
3529
3540
  * Decrypts data using RSAES-OAEP with SHA-1
3530
3541
  * HAZMAT WARNING: Do not use outside of implementing cryptofunctionservice
@@ -5020,7 +5031,7 @@ export function __wbg_call_e762c39fa8ea36bf() { return handleError(function (arg
5020
5031
  return addHeapObject(ret);
5021
5032
  }, arguments) };
5022
5033
 
5023
- export function __wbg_cipher_bd12833081059094(arg0) {
5034
+ export function __wbg_cipher_45784aa3fd1e0894(arg0) {
5024
5035
  const ret = getObject(arg0).cipher;
5025
5036
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
5026
5037
  };
@@ -5107,7 +5118,7 @@ export function __wbg_fetch_f8ba0e29a9d6de0d(arg0, arg1) {
5107
5118
  return addHeapObject(ret);
5108
5119
  };
5109
5120
 
5110
- export function __wbg_folder_9b5607918316d40c(arg0) {
5121
+ export function __wbg_folder_e962b09dda2c5a7e(arg0) {
5111
5122
  const ret = getObject(arg0).folder;
5112
5123
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
5113
5124
  };
@@ -5139,7 +5150,17 @@ export function __wbg_getTime_14776bfb48a1bff9(arg0) {
5139
5150
  return ret;
5140
5151
  };
5141
5152
 
5142
- export function __wbg_get_3051588231186fa1() { return handleError(function (arg0, arg1, arg2) {
5153
+ export function __wbg_get_7bed016f185add81(arg0, arg1) {
5154
+ const ret = getObject(arg0)[arg1 >>> 0];
5155
+ return addHeapObject(ret);
5156
+ };
5157
+
5158
+ export function __wbg_get_access_token_c99c8e679891fd36(arg0) {
5159
+ const ret = getObject(arg0).get_access_token();
5160
+ return addHeapObject(ret);
5161
+ };
5162
+
5163
+ export function __wbg_get_c03a59ff46a549dd() { return handleError(function (arg0, arg1, arg2) {
5143
5164
  let deferred0_0;
5144
5165
  let deferred0_1;
5145
5166
  try {
@@ -5152,7 +5173,7 @@ export function __wbg_get_3051588231186fa1() { return handleError(function (arg0
5152
5173
  }
5153
5174
  }, arguments) };
5154
5175
 
5155
- export function __wbg_get_7422bbeb4651208e() { return handleError(function (arg0, arg1, arg2) {
5176
+ export function __wbg_get_cb2b978f8f284157() { return handleError(function (arg0, arg1, arg2) {
5156
5177
  let deferred0_0;
5157
5178
  let deferred0_1;
5158
5179
  try {
@@ -5165,17 +5186,7 @@ export function __wbg_get_7422bbeb4651208e() { return handleError(function (arg0
5165
5186
  }
5166
5187
  }, arguments) };
5167
5188
 
5168
- export function __wbg_get_7bed016f185add81(arg0, arg1) {
5169
- const ret = getObject(arg0)[arg1 >>> 0];
5170
- return addHeapObject(ret);
5171
- };
5172
-
5173
- export function __wbg_get_access_token_fc23a484b51c92ed(arg0) {
5174
- const ret = getObject(arg0).get_access_token();
5175
- return addHeapObject(ret);
5176
- };
5177
-
5178
- export function __wbg_get_c03a59ff46a549dd() { return handleError(function (arg0, arg1, arg2) {
5189
+ export function __wbg_get_e5e40408d89fe74c() { return handleError(function (arg0, arg1, arg2) {
5179
5190
  let deferred0_0;
5180
5191
  let deferred0_1;
5181
5192
  try {
@@ -5376,12 +5387,12 @@ export function __wbg_length_cdd215e10d9dd507(arg0) {
5376
5387
  return ret;
5377
5388
  };
5378
5389
 
5379
- export function __wbg_list_78bb83ef4d47ea84() { return handleError(function (arg0) {
5390
+ export function __wbg_list_f9931b026dd3b32c() { return handleError(function (arg0) {
5380
5391
  const ret = getObject(arg0).list();
5381
5392
  return addHeapObject(ret);
5382
5393
  }, arguments) };
5383
5394
 
5384
- export function __wbg_list_7cfe37c82a894078() { return handleError(function (arg0) {
5395
+ export function __wbg_list_fb91ff3fffa60028() { return handleError(function (arg0) {
5385
5396
  const ret = getObject(arg0).list();
5386
5397
  return addHeapObject(ret);
5387
5398
  }, arguments) };
@@ -5582,7 +5593,7 @@ export function __wbg_randomFillSync_f8c153b79f285817() { return handleError(fun
5582
5593
  getObject(arg0).randomFillSync(takeObject(arg1));
5583
5594
  }, arguments) };
5584
5595
 
5585
- export function __wbg_remove_3470222e909cc255() { return handleError(function (arg0, arg1, arg2) {
5596
+ export function __wbg_remove_632104ab2021517c() { return handleError(function (arg0, arg1, arg2) {
5586
5597
  let deferred0_0;
5587
5598
  let deferred0_1;
5588
5599
  try {
@@ -5595,7 +5606,7 @@ export function __wbg_remove_3470222e909cc255() { return handleError(function (a
5595
5606
  }
5596
5607
  }, arguments) };
5597
5608
 
5598
- export function __wbg_remove_a3392d5724e98d40() { return handleError(function (arg0, arg1, arg2) {
5609
+ export function __wbg_remove_ab13780244ef2a22() { return handleError(function (arg0, arg1, arg2) {
5599
5610
  let deferred0_0;
5600
5611
  let deferred0_1;
5601
5612
  try {
@@ -5646,7 +5657,11 @@ export function __wbg_setTimeout_4ec014681668a581(arg0, arg1) {
5646
5657
  return addHeapObject(ret);
5647
5658
  };
5648
5659
 
5649
- export function __wbg_set_2698d186b5f13338() { return handleError(function (arg0, arg1, arg2, arg3) {
5660
+ export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
5661
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
5662
+ };
5663
+
5664
+ export function __wbg_set_4d678a91b1a1a026() { return handleError(function (arg0, arg1, arg2, arg3) {
5650
5665
  let deferred0_0;
5651
5666
  let deferred0_1;
5652
5667
  try {
@@ -5659,28 +5674,11 @@ export function __wbg_set_2698d186b5f13338() { return handleError(function (arg0
5659
5674
  }
5660
5675
  }, arguments) };
5661
5676
 
5662
- export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
5663
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
5664
- };
5665
-
5666
5677
  export function __wbg_set_907fb406c34a251d(arg0, arg1, arg2) {
5667
5678
  const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
5668
5679
  return addHeapObject(ret);
5669
5680
  };
5670
5681
 
5671
- export function __wbg_set_a3eb54c3873d7e5b() { return handleError(function (arg0, arg1, arg2, arg3) {
5672
- let deferred0_0;
5673
- let deferred0_1;
5674
- try {
5675
- deferred0_0 = arg1;
5676
- deferred0_1 = arg2;
5677
- const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
5678
- return addHeapObject(ret);
5679
- } finally {
5680
- wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
5681
- }
5682
- }, arguments) };
5683
-
5684
5682
  export function __wbg_set_body_3c365989753d61f4(arg0, arg1) {
5685
5683
  getObject(arg0).body = getObject(arg1);
5686
5684
  };
@@ -5697,6 +5695,19 @@ export function __wbg_set_credentials_f621cd2d85c0c228(arg0, arg1) {
5697
5695
  getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
5698
5696
  };
5699
5697
 
5698
+ export function __wbg_set_fa1b43b5269fa461() { return handleError(function (arg0, arg1, arg2, arg3) {
5699
+ let deferred0_0;
5700
+ let deferred0_1;
5701
+ try {
5702
+ deferred0_0 = arg1;
5703
+ deferred0_1 = arg2;
5704
+ const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
5705
+ return addHeapObject(ret);
5706
+ } finally {
5707
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
5708
+ }
5709
+ }, arguments) };
5710
+
5700
5711
  export function __wbg_set_headers_6926da238cd32ee4(arg0, arg1) {
5701
5712
  getObject(arg0).headers = getObject(arg1);
5702
5713
  };
Binary file
@@ -71,6 +71,7 @@ export const purecrypto_encrypt_user_key_with_master_password: (
71
71
  export const purecrypto_key_algorithm_for_verifying_key: (a: number, b: number, c: number) => void;
72
72
  export const purecrypto_make_user_key_aes256_cbc_hmac: (a: number) => void;
73
73
  export const purecrypto_make_user_key_xchacha20_poly1305: (a: number) => void;
74
+ export const purecrypto_random_number: (a: number, b: number) => number;
74
75
  export const purecrypto_rsa_decrypt_data: (
75
76
  a: number,
76
77
  b: number,
@@ -542,25 +543,25 @@ export const __wbg_get_outgoingmessage_destination: (a: number) => number;
542
543
  export const vaultclient_attachments: (a: number) => number;
543
544
  export const __wbg_set_outgoingmessage_destination: (a: number, b: number) => void;
544
545
  export const __wbg_cryptoclient_free: (a: number, b: number) => void;
545
- export const wasm_bindgen__convert__closures_____invoke__hf245910ad5d68b6c: (
546
+ export const wasm_bindgen__convert__closures_____invoke__h05f50e601cb9cbc9: (
546
547
  a: number,
547
548
  b: number,
548
549
  c: number,
549
- d: number,
550
550
  ) => void;
551
551
  export const wasm_bindgen__closure__destroy__h0d309ba826c21d2e: (a: number, b: number) => void;
552
+ export const wasm_bindgen__closure__destroy__ha6acfc0fc44e75c9: (a: number, b: number) => void;
552
553
  export const wasm_bindgen__convert__closures_____invoke__h7c6e0808d83e1743: (
553
554
  a: number,
554
555
  b: number,
555
556
  ) => void;
556
557
  export const wasm_bindgen__closure__destroy__h14b8abadf056d28e: (a: number, b: number) => void;
557
558
  export const wasm_bindgen__closure__destroy__h2b9785764fab287c: (a: number, b: number) => void;
558
- export const wasm_bindgen__convert__closures_____invoke__h05f50e601cb9cbc9: (
559
+ export const wasm_bindgen__convert__closures_____invoke__hf245910ad5d68b6c: (
559
560
  a: number,
560
561
  b: number,
561
562
  c: number,
563
+ d: number,
562
564
  ) => void;
563
- export const wasm_bindgen__closure__destroy__ha6acfc0fc44e75c9: (a: number, b: number) => void;
564
565
  export const wasm_bindgen__convert__closures_____invoke__hc4d57ad329cc6f58: (
565
566
  a: number,
566
567
  b: number,