crypto: Don't use the full PBKDF rounds when testing

master
Damir Jelić 2021-01-20 11:14:00 +01:00
parent 28cc5acc87
commit 06a973a1b8
1 changed files with 3 additions and 0 deletions

View File

@ -30,7 +30,10 @@ use serde::{Deserialize, Serialize};
const KEY_SIZE: usize = 32; const KEY_SIZE: usize = 32;
const NONCE_SIZE: usize = 12; const NONCE_SIZE: usize = 12;
const KDF_SALT_SIZE: usize = 32; const KDF_SALT_SIZE: usize = 32;
#[cfg(not(test))]
const KDF_ROUNDS: u32 = 200_000; const KDF_ROUNDS: u32 = 200_000;
#[cfg(test)]
const KDF_ROUNDS: u32 = 1000;
/// Version specific info for the key derivation method that is used. /// Version specific info for the key derivation method that is used.
#[derive(Debug, Serialize, Deserialize, PartialEq)] #[derive(Debug, Serialize, Deserialize, PartialEq)]