From: Andrej Kacian Date: Mon, 11 Apr 2016 16:30:18 +0000 (+0200) Subject: Show duration of PBKDF2 computation in debug output. X-Git-Tag: 3.14.0~107 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=e630ef9df0b19c3bc97b79f949fbbf3dc32d0af0;hp=1da06231697b58750eb5549bb6844d20f9fade08 Show duration of PBKDF2 computation in debug output. --- 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);