1
0
mirror of https://github.com/bitwarden/server synced 2025-12-16 16:23:31 +00:00

Speed up KDF

This commit is contained in:
Hinton
2025-07-31 16:39:12 +02:00
parent 3132e09e21
commit 3ad308138e
7 changed files with 23 additions and 19 deletions

View File

@@ -11,11 +11,6 @@ use bitwarden_crypto::{
SpkiPublicKeyBytes, SymmetricCryptoKey, UnsignedSharedKey, UserKey,
};
#[no_mangle]
pub extern "C" fn my_add(x: i32, y: i32) -> i32 {
x + y
}
#[no_mangle]
pub unsafe extern "C" fn generate_user_keys(
email: *const c_char,
@@ -23,7 +18,7 @@ pub unsafe extern "C" fn generate_user_keys(
) -> *const c_char {
// TODO: We might want to make KDF configurable in the future.
let kdf = Kdf::PBKDF2 {
iterations: NonZeroU32::new(600_000).unwrap(),
iterations: NonZeroU32::new(5_000).unwrap(),
};
let email = CStr::from_ptr(email).to_str().unwrap();