@bitwarden/sdk-internal 0.2.0-main.222 → 0.2.0-main.223
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 +1 -1
- package/bitwarden_wasm_internal.d.ts +4 -0
- package/bitwarden_wasm_internal_bg.js +51 -22
- package/bitwarden_wasm_internal_bg.wasm +0 -0
- package/bitwarden_wasm_internal_bg.wasm.d.ts +8 -0
- package/bitwarden_wasm_internal_bg.wasm.js +1 -1
- package/node/bitwarden_wasm_internal.d.ts +4 -0
- package/node/bitwarden_wasm_internal.js +51 -22
- package/node/bitwarden_wasm_internal_bg.wasm +0 -0
- package/node/bitwarden_wasm_internal_bg.wasm.d.ts +8 -0
- package/package.json +1 -1
|
@@ -1595,6 +1595,10 @@ export class PureCrypto {
|
|
|
1595
1595
|
signed_public_key: Uint8Array,
|
|
1596
1596
|
verifying_key: Uint8Array,
|
|
1597
1597
|
): Uint8Array;
|
|
1598
|
+
/**
|
|
1599
|
+
* Derive output of the KDF for a [bitwarden_crypto::Kdf] configuration.
|
|
1600
|
+
*/
|
|
1601
|
+
static derive_kdf_material(password: Uint8Array, salt: Uint8Array, kdf: Kdf): Uint8Array;
|
|
1598
1602
|
}
|
|
1599
1603
|
export class StateClient {
|
|
1600
1604
|
private constructor();
|
|
@@ -747,7 +747,7 @@ function __wbg_adapter_56(arg0, arg1, arg2) {
|
|
|
747
747
|
);
|
|
748
748
|
}
|
|
749
749
|
|
|
750
|
-
function
|
|
750
|
+
function __wbg_adapter_279(arg0, arg1, arg2, arg3) {
|
|
751
751
|
wasm.wasm_bindgen__convert__closures__invoke2_mut__h8776500d04a3e634(
|
|
752
752
|
arg0,
|
|
753
753
|
arg1,
|
|
@@ -3062,6 +3062,35 @@ class PureCrypto {
|
|
|
3062
3062
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
3063
3063
|
}
|
|
3064
3064
|
}
|
|
3065
|
+
/**
|
|
3066
|
+
* Derive output of the KDF for a [bitwarden_crypto::Kdf] configuration.
|
|
3067
|
+
* @param {Uint8Array} password
|
|
3068
|
+
* @param {Uint8Array} salt
|
|
3069
|
+
* @param {Kdf} kdf
|
|
3070
|
+
* @returns {Uint8Array}
|
|
3071
|
+
*/
|
|
3072
|
+
static derive_kdf_material(password, salt, kdf) {
|
|
3073
|
+
try {
|
|
3074
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3075
|
+
const ptr0 = passArray8ToWasm0(password, wasm.__wbindgen_malloc);
|
|
3076
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3077
|
+
const ptr1 = passArray8ToWasm0(salt, wasm.__wbindgen_malloc);
|
|
3078
|
+
const len1 = WASM_VECTOR_LEN;
|
|
3079
|
+
wasm.purecrypto_derive_kdf_material(retptr, ptr0, len0, ptr1, len1, addHeapObject(kdf));
|
|
3080
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3081
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3082
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
3083
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
3084
|
+
if (r3) {
|
|
3085
|
+
throw takeObject(r2);
|
|
3086
|
+
}
|
|
3087
|
+
var v3 = getArrayU8FromWasm0(r0, r1).slice();
|
|
3088
|
+
wasm.__wbindgen_free(r0, r1 * 1, 1);
|
|
3089
|
+
return v3;
|
|
3090
|
+
} finally {
|
|
3091
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
3092
|
+
}
|
|
3093
|
+
}
|
|
3065
3094
|
}
|
|
3066
3095
|
module.exports.PureCrypto = PureCrypto;
|
|
3067
3096
|
|
|
@@ -3358,7 +3387,19 @@ module.exports.__wbg_getTime_46267b1c24877e30 = function (arg0) {
|
|
|
3358
3387
|
return ret;
|
|
3359
3388
|
};
|
|
3360
3389
|
|
|
3361
|
-
module.exports.
|
|
3390
|
+
module.exports.__wbg_get_67b2ba62fc30de12 = function () {
|
|
3391
|
+
return handleError(function (arg0, arg1) {
|
|
3392
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
3393
|
+
return addHeapObject(ret);
|
|
3394
|
+
}, arguments);
|
|
3395
|
+
};
|
|
3396
|
+
|
|
3397
|
+
module.exports.__wbg_get_b9b93047fe3cf45b = function (arg0, arg1) {
|
|
3398
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
3399
|
+
return addHeapObject(ret);
|
|
3400
|
+
};
|
|
3401
|
+
|
|
3402
|
+
module.exports.__wbg_get_d7e08493e14d3073 = function () {
|
|
3362
3403
|
return handleError(function (arg0, arg1, arg2) {
|
|
3363
3404
|
let deferred0_0;
|
|
3364
3405
|
let deferred0_1;
|
|
@@ -3373,19 +3414,7 @@ module.exports.__wbg_get_19ade86a11be7465 = function () {
|
|
|
3373
3414
|
}, arguments);
|
|
3374
3415
|
};
|
|
3375
3416
|
|
|
3376
|
-
module.exports.
|
|
3377
|
-
return handleError(function (arg0, arg1) {
|
|
3378
|
-
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
3379
|
-
return addHeapObject(ret);
|
|
3380
|
-
}, arguments);
|
|
3381
|
-
};
|
|
3382
|
-
|
|
3383
|
-
module.exports.__wbg_get_b9b93047fe3cf45b = function (arg0, arg1) {
|
|
3384
|
-
const ret = getObject(arg0)[arg1 >>> 0];
|
|
3385
|
-
return addHeapObject(ret);
|
|
3386
|
-
};
|
|
3387
|
-
|
|
3388
|
-
module.exports.__wbg_getaccesstoken_6f28f7da38d99e02 = function (arg0) {
|
|
3417
|
+
module.exports.__wbg_getaccesstoken_a6776220c768495c = function (arg0) {
|
|
3389
3418
|
const ret = getObject(arg0).get_access_token();
|
|
3390
3419
|
return addHeapObject(ret);
|
|
3391
3420
|
};
|
|
@@ -3490,7 +3519,7 @@ module.exports.__wbg_length_e2d2a49132c1b256 = function (arg0) {
|
|
|
3490
3519
|
return ret;
|
|
3491
3520
|
};
|
|
3492
3521
|
|
|
3493
|
-
module.exports.
|
|
3522
|
+
module.exports.__wbg_list_296175588665e03b = function () {
|
|
3494
3523
|
return handleError(function (arg0) {
|
|
3495
3524
|
const ret = getObject(arg0).list();
|
|
3496
3525
|
return addHeapObject(ret);
|
|
@@ -3525,7 +3554,7 @@ module.exports.__wbg_new_23a2665fac83c611 = function (arg0, arg1) {
|
|
|
3525
3554
|
const a = state0.a;
|
|
3526
3555
|
state0.a = 0;
|
|
3527
3556
|
try {
|
|
3528
|
-
return
|
|
3557
|
+
return __wbg_adapter_279(a, state0.b, arg0, arg1);
|
|
3529
3558
|
} finally {
|
|
3530
3559
|
state0.a = a;
|
|
3531
3560
|
}
|
|
@@ -3667,7 +3696,7 @@ module.exports.__wbg_randomFillSync_ac0988aba3254290 = function () {
|
|
|
3667
3696
|
}, arguments);
|
|
3668
3697
|
};
|
|
3669
3698
|
|
|
3670
|
-
module.exports.
|
|
3699
|
+
module.exports.__wbg_remove_91062ef36398ce81 = function () {
|
|
3671
3700
|
return handleError(function (arg0, arg1, arg2) {
|
|
3672
3701
|
let deferred0_0;
|
|
3673
3702
|
let deferred0_1;
|
|
@@ -3718,7 +3747,7 @@ module.exports.__wbg_set_65595bdd868b3009 = function (arg0, arg1, arg2) {
|
|
|
3718
3747
|
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
3719
3748
|
};
|
|
3720
3749
|
|
|
3721
|
-
module.exports.
|
|
3750
|
+
module.exports.__wbg_set_e1312fa33b0e0bba = function () {
|
|
3722
3751
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
3723
3752
|
let deferred0_0;
|
|
3724
3753
|
let deferred0_1;
|
|
@@ -3912,17 +3941,17 @@ module.exports.__wbindgen_cb_drop = function (arg0) {
|
|
|
3912
3941
|
return ret;
|
|
3913
3942
|
};
|
|
3914
3943
|
|
|
3915
|
-
module.exports.
|
|
3944
|
+
module.exports.__wbindgen_closure_wrapper2908 = function (arg0, arg1, arg2) {
|
|
3916
3945
|
const ret = makeMutClosure(arg0, arg1, 919, __wbg_adapter_50);
|
|
3917
3946
|
return addHeapObject(ret);
|
|
3918
3947
|
};
|
|
3919
3948
|
|
|
3920
|
-
module.exports.
|
|
3949
|
+
module.exports.__wbindgen_closure_wrapper3748 = function (arg0, arg1, arg2) {
|
|
3921
3950
|
const ret = makeMutClosure(arg0, arg1, 1003, __wbg_adapter_53);
|
|
3922
3951
|
return addHeapObject(ret);
|
|
3923
3952
|
};
|
|
3924
3953
|
|
|
3925
|
-
module.exports.
|
|
3954
|
+
module.exports.__wbindgen_closure_wrapper4166 = function (arg0, arg1, arg2) {
|
|
3926
3955
|
const ret = makeMutClosure(arg0, arg1, 1126, __wbg_adapter_56);
|
|
3927
3956
|
return addHeapObject(ret);
|
|
3928
3957
|
};
|
|
Binary file
|
|
@@ -308,6 +308,14 @@ export const purecrypto_verify_and_unwrap_signed_public_key: (
|
|
|
308
308
|
d: number,
|
|
309
309
|
e: number,
|
|
310
310
|
) => void;
|
|
311
|
+
export const purecrypto_derive_kdf_material: (
|
|
312
|
+
a: number,
|
|
313
|
+
b: number,
|
|
314
|
+
c: number,
|
|
315
|
+
d: number,
|
|
316
|
+
e: number,
|
|
317
|
+
f: number,
|
|
318
|
+
) => void;
|
|
311
319
|
export const generate_ssh_key: (a: number, b: number) => void;
|
|
312
320
|
export const import_ssh_key: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
313
321
|
export const isTestError: (a: number) => number;
|