mirror of
https://github.com/bitwarden/server
synced 2025-12-16 16:23:31 +00:00
Speed up KDF
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user