From e630ef9df0b19c3bc97b79f949fbbf3dc32d0af0 Mon Sep 17 00:00:00 2001 From: Andrej Kacian Date: Mon, 11 Apr 2016 18:30:18 +0200 Subject: [PATCH 1/1] Show duration of PBKDF2 computation in debug output. --- src/password.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/password.c b/src/password.c index 461a5b7fa..6cef02128 100644 --- a/src/password.c +++ b/src/password.c @@ -41,6 +41,7 @@ #include "common/passcrypt.h" #include "common/plugin.h" #include "common/pkcs5_pbkdf2.h" +#include "common/timing.h" #include "common/utils.h" #include "account.h" #include "alertpanel.h" @@ -126,8 +127,10 @@ static guchar *_make_key_deriv(const gchar *passphrase, guint rounds) salt = g_base64_decode(saltpref, &saltlen); kd = g_malloc0(KD_LENGTH); + START_TIMING("PBKDF2"); ret = pkcs5_pbkdf2(passphrase, strlen(passphrase), salt, saltlen, kd, KD_LENGTH, rounds); + END_TIMING(); g_free(salt); -- 2.25.1