Add callback for PBKDF benchmark.

Also change API so the kdf structure is continuously updated
with the benchmarked data (callback can see progress or debug).
This commit is contained in:
Milan Broz
2017-08-09 13:41:11 +02:00
parent 93ea4f4f6f
commit 4125beb0fb
6 changed files with 89 additions and 78 deletions

View File

@@ -67,7 +67,8 @@ int crypt_pbkdf_perf(const char *kdf, const char *hash,
const char *salt, size_t salt_size,
size_t volume_key_size, uint32_t time_ms,
uint32_t max_memory_kb, uint32_t parallel_threads,
uint32_t *iterations_out, uint32_t *memory_out);
uint32_t *iterations_out, uint32_t *memory_out,
int (*progress)(long time_ms, void *usrptr), void *usrptr);
#if USE_INTERNAL_PBKDF2
/* internal PBKDF2 implementation */