projects
/
claws.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1da0623
)
Show duration of PBKDF2 computation in debug output.
author
Andrej Kacian
<ticho@claws-mail.org>
Mon, 11 Apr 2016 16:30:18 +0000
(18:30 +0200)
committer
Andrej Kacian
<ticho@claws-mail.org>
Mon, 11 Apr 2016 16:30:18 +0000
(18:30 +0200)
src/password.c
patch
|
blob
|
history
diff --git
a/src/password.c
b/src/password.c
index 461a5b7fa960cf65683570a18f36cd0a0b98e69c..6cef02128cff31f11c5072abe5cdbe5c0485c6d7 100644
(file)
--- 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);