From 9101c050aa6724c5af82105d2f2b4f07f3d6e565 Mon Sep 17 00:00:00 2001 From: Jochen Hoenicke Date: Tue, 12 Jul 2016 15:06:24 +0200 Subject: [PATCH] Smoother progress bar for wakeup Call interrupt twice as often; makes progress bar smoother. --- bip39.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bip39.c b/bip39.c index c35fbd76c..ef7a40e5f 100644 --- a/bip39.c +++ b/bip39.c @@ -226,10 +226,10 @@ void mnemonic_to_seed(const char *mnemonic, const char *passphrase, uint8_t seed if (progress_callback) { progress_callback(0, BIP39_PBKDF2_ROUNDS); } - for (int i = 0; i < 8; i++) { - pbkdf2_hmac_sha512_Update(&pctx, BIP39_PBKDF2_ROUNDS / 8); + for (int i = 0; i < 16; i++) { + pbkdf2_hmac_sha512_Update(&pctx, BIP39_PBKDF2_ROUNDS / 16); if (progress_callback) { - progress_callback((i + 1) * BIP39_PBKDF2_ROUNDS / 8, BIP39_PBKDF2_ROUNDS); + progress_callback((i + 1) * BIP39_PBKDF2_ROUNDS / 16, BIP39_PBKDF2_ROUNDS); } } pbkdf2_hmac_sha512_Final(&pctx, seed);