@bitwarden/sdk-internal 0.2.0-main.309 → 0.2.0-main.310

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
- 1ca5a589f78117e54e36ce5b7cb77f5212f068e9
1
+ 92bb5c30abbcd9a12f429cf60df681492c886c65
@@ -2118,6 +2118,10 @@ export class PureCrypto {
2118
2118
  * Derive output of the KDF for a [bitwarden_crypto::Kdf] configuration.
2119
2119
  */
2120
2120
  static derive_kdf_material(password: Uint8Array, salt: Uint8Array, kdf: Kdf): Uint8Array;
2121
+ static decrypt_user_key_with_master_key(
2122
+ encrypted_user_key: string,
2123
+ master_key: Uint8Array,
2124
+ ): Uint8Array;
2121
2125
  }
2122
2126
  /**
2123
2127
  * The `SendAccessClient` is used to interact with the Bitwarden API to get send access tokens.
@@ -867,7 +867,7 @@ function __wbg_adapter_60(arg0, arg1) {
867
867
  );
868
868
  }
869
869
 
870
- function __wbg_adapter_336(arg0, arg1, arg2, arg3) {
870
+ function __wbg_adapter_337(arg0, arg1, arg2, arg3) {
871
871
  wasm.wasm_bindgen__convert__closures__invoke2_mut__h54a8613170fef18e(
872
872
  arg0,
873
873
  arg1,
@@ -3716,6 +3716,37 @@ export class PureCrypto {
3716
3716
  wasm.__wbindgen_add_to_stack_pointer(16);
3717
3717
  }
3718
3718
  }
3719
+ /**
3720
+ * @param {string} encrypted_user_key
3721
+ * @param {Uint8Array} master_key
3722
+ * @returns {Uint8Array}
3723
+ */
3724
+ static decrypt_user_key_with_master_key(encrypted_user_key, master_key) {
3725
+ try {
3726
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3727
+ const ptr0 = passStringToWasm0(
3728
+ encrypted_user_key,
3729
+ wasm.__wbindgen_malloc,
3730
+ wasm.__wbindgen_realloc,
3731
+ );
3732
+ const len0 = WASM_VECTOR_LEN;
3733
+ const ptr1 = passArray8ToWasm0(master_key, wasm.__wbindgen_malloc);
3734
+ const len1 = WASM_VECTOR_LEN;
3735
+ wasm.purecrypto_decrypt_user_key_with_master_key(retptr, ptr0, len0, ptr1, len1);
3736
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3737
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3738
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
3739
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
3740
+ if (r3) {
3741
+ throw takeObject(r2);
3742
+ }
3743
+ var v3 = getArrayU8FromWasm0(r0, r1).slice();
3744
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
3745
+ return v3;
3746
+ } finally {
3747
+ wasm.__wbindgen_add_to_stack_pointer(16);
3748
+ }
3749
+ }
3719
3750
  }
3720
3751
 
3721
3752
  const SendAccessClientFinalization =
@@ -4110,14 +4141,7 @@ export function __wbg_getTime_46267b1c24877e30(arg0) {
4110
4141
  return ret;
4111
4142
  }
4112
4143
 
4113
- export function __wbg_get_67b2ba62fc30de12() {
4114
- return handleError(function (arg0, arg1) {
4115
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
4116
- return addHeapObject(ret);
4117
- }, arguments);
4118
- }
4119
-
4120
- export function __wbg_get_945a0b915f37e6a5() {
4144
+ export function __wbg_get_3a409a7dafd3e832() {
4121
4145
  return handleError(function (arg0, arg1, arg2) {
4122
4146
  let deferred0_0;
4123
4147
  let deferred0_1;
@@ -4132,7 +4156,14 @@ export function __wbg_get_945a0b915f37e6a5() {
4132
4156
  }, arguments);
4133
4157
  }
4134
4158
 
4135
- export function __wbg_get_9ee78ff9ed59da5e() {
4159
+ export function __wbg_get_67b2ba62fc30de12() {
4160
+ return handleError(function (arg0, arg1) {
4161
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
4162
+ return addHeapObject(ret);
4163
+ }, arguments);
4164
+ }
4165
+
4166
+ export function __wbg_get_95a0582c46fd0c96() {
4136
4167
  return handleError(function (arg0, arg1, arg2) {
4137
4168
  let deferred0_0;
4138
4169
  let deferred0_1;
@@ -4152,7 +4183,7 @@ export function __wbg_get_b9b93047fe3cf45b(arg0, arg1) {
4152
4183
  return addHeapObject(ret);
4153
4184
  }
4154
4185
 
4155
- export function __wbg_getaccesstoken_02c003cee7a7f946(arg0) {
4186
+ export function __wbg_getaccesstoken_cbb2f210f2f61bbd(arg0) {
4156
4187
  const ret = getObject(arg0).get_access_token();
4157
4188
  return addHeapObject(ret);
4158
4189
  }
@@ -4337,14 +4368,14 @@ export function __wbg_length_e2d2a49132c1b256(arg0) {
4337
4368
  return ret;
4338
4369
  }
4339
4370
 
4340
- export function __wbg_list_089304e0f8b73332() {
4371
+ export function __wbg_list_b1cdc7778de66020() {
4341
4372
  return handleError(function (arg0) {
4342
4373
  const ret = getObject(arg0).list();
4343
4374
  return addHeapObject(ret);
4344
4375
  }, arguments);
4345
4376
  }
4346
4377
 
4347
- export function __wbg_list_8f1660977cede183() {
4378
+ export function __wbg_list_bcf3b9131930635a() {
4348
4379
  return handleError(function (arg0) {
4349
4380
  const ret = getObject(arg0).list();
4350
4381
  return addHeapObject(ret);
@@ -4387,7 +4418,7 @@ export function __wbg_new_23a2665fac83c611(arg0, arg1) {
4387
4418
  const a = state0.a;
4388
4419
  state0.a = 0;
4389
4420
  try {
4390
- return __wbg_adapter_336(a, state0.b, arg0, arg1);
4421
+ return __wbg_adapter_337(a, state0.b, arg0, arg1);
4391
4422
  } finally {
4392
4423
  state0.a = a;
4393
4424
  }
@@ -4545,7 +4576,7 @@ export function __wbg_randomFillSync_ac0988aba3254290() {
4545
4576
  }, arguments);
4546
4577
  }
4547
4578
 
4548
- export function __wbg_remove_040e62d289940f27() {
4579
+ export function __wbg_remove_975abb7a03360aba() {
4549
4580
  return handleError(function (arg0, arg1, arg2) {
4550
4581
  let deferred0_0;
4551
4582
  let deferred0_1;
@@ -4560,7 +4591,7 @@ export function __wbg_remove_040e62d289940f27() {
4560
4591
  }, arguments);
4561
4592
  }
4562
4593
 
4563
- export function __wbg_remove_776df28597eb84c1() {
4594
+ export function __wbg_remove_b7b33f655fbc8553() {
4564
4595
  return handleError(function (arg0, arg1, arg2) {
4565
4596
  let deferred0_0;
4566
4597
  let deferred0_1;
@@ -4614,7 +4645,7 @@ export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
4614
4645
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
4615
4646
  }
4616
4647
 
4617
- export function __wbg_set_4b0d9d322752f026() {
4648
+ export function __wbg_set_40d071fe896210d7() {
4618
4649
  return handleError(function (arg0, arg1, arg2, arg3) {
4619
4650
  let deferred0_0;
4620
4651
  let deferred0_1;
@@ -4638,7 +4669,7 @@ export function __wbg_set_8fc6bf8a5b1071d1(arg0, arg1, arg2) {
4638
4669
  return addHeapObject(ret);
4639
4670
  }
4640
4671
 
4641
- export function __wbg_set_ce6e1a0d1eefa91c() {
4672
+ export function __wbg_set_9b654d2ccc308957() {
4642
4673
  return handleError(function (arg0, arg1, arg2, arg3) {
4643
4674
  let deferred0_0;
4644
4675
  let deferred0_1;
@@ -4873,17 +4904,17 @@ export function __wbindgen_closure_wrapper193(arg0, arg1, arg2) {
4873
4904
  return addHeapObject(ret);
4874
4905
  }
4875
4906
 
4876
- export function __wbindgen_closure_wrapper3784(arg0, arg1, arg2) {
4907
+ export function __wbindgen_closure_wrapper3786(arg0, arg1, arg2) {
4877
4908
  const ret = makeMutClosure(arg0, arg1, 294, __wbg_adapter_60);
4878
4909
  return addHeapObject(ret);
4879
4910
  }
4880
4911
 
4881
- export function __wbindgen_closure_wrapper6138(arg0, arg1, arg2) {
4912
+ export function __wbindgen_closure_wrapper6140(arg0, arg1, arg2) {
4882
4913
  const ret = makeMutClosure(arg0, arg1, 319, __wbg_adapter_60);
4883
4914
  return addHeapObject(ret);
4884
4915
  }
4885
4916
 
4886
- export function __wbindgen_closure_wrapper6519(arg0, arg1, arg2) {
4917
+ export function __wbindgen_closure_wrapper6521(arg0, arg1, arg2) {
4887
4918
  const ret = makeMutClosure(arg0, arg1, 342, __wbg_adapter_57);
4888
4919
  return addHeapObject(ret);
4889
4920
  }
Binary file
@@ -170,6 +170,13 @@ export const purecrypto_derive_kdf_material: (
170
170
  e: number,
171
171
  f: number,
172
172
  ) => void;
173
+ export const purecrypto_decrypt_user_key_with_master_key: (
174
+ a: number,
175
+ b: number,
176
+ c: number,
177
+ d: number,
178
+ e: number,
179
+ ) => void;
173
180
  export const generate_ssh_key: (a: number, b: number) => void;
174
181
  export const import_ssh_key: (a: number, b: number, c: number, d: number, e: number) => void;
175
182
  export const isTestError: (a: number) => number;