From 06a973a1b81419b28562ab00c32c6cbfb15d09d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Wed, 20 Jan 2021 11:14:00 +0100 Subject: [PATCH] crypto: Don't use the full PBKDF rounds when testing --- matrix_sdk_crypto/src/store/pickle_key.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/matrix_sdk_crypto/src/store/pickle_key.rs b/matrix_sdk_crypto/src/store/pickle_key.rs index 883b22b1..7794e348 100644 --- a/matrix_sdk_crypto/src/store/pickle_key.rs +++ b/matrix_sdk_crypto/src/store/pickle_key.rs @@ -30,7 +30,10 @@ use serde::{Deserialize, Serialize}; const KEY_SIZE: usize = 32; const NONCE_SIZE: usize = 12; const KDF_SALT_SIZE: usize = 32; +#[cfg(not(test))] const KDF_ROUNDS: u32 = 200_000; +#[cfg(test)] +const KDF_ROUNDS: u32 = 1000; /// Version specific info for the key derivation method that is used. #[derive(Debug, Serialize, Deserialize, PartialEq)]