talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit e630ef9df0b19c3bc97b79f949fbbf3dc32d0af0
parent 1da06231697b58750eb5549bb6844d20f9fade08
Author: Andrej Kacian <ticho@claws-mail.org>
Date:   Mon, 11 Apr 2016 18:30:18 +0200

Show duration of PBKDF2 computation in debug output.

Diffstat:
Msrc/password.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git 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);