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

@@ -1110,14 +1110,14 @@ int crypt_benchmark(struct crypt_device *cd,
* @return @e 0 on success or negative errno value otherwise.
*/
int crypt_benchmark_pbkdf(struct crypt_device *cd,
const struct crypt_pbkdf_type *pbkdf,
struct crypt_pbkdf_type *pbkdf,
const char *password,
size_t password_size,
const char *salt,
size_t salt_size,
size_t volume_key_size,
uint32_t *iterations,
uint32_t *memory);
int (*progress)(long time_ms, void *usrptr),
void *usrptr);
/** @} */