mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-16 05:10:03 +01:00
Fix PBKDF benchmark for old PBKDF2 tests (hash specified only).
This commit is contained in:
@@ -654,7 +654,9 @@ static int action_benchmark(void)
|
|||||||
int i, r;
|
int i, r;
|
||||||
|
|
||||||
log_std(_("# Tests are approximate using memory only (no storage IO).\n"));
|
log_std(_("# Tests are approximate using memory only (no storage IO).\n"));
|
||||||
if (opt_pbkdf && (strcmp(opt_pbkdf, CRYPT_KDF_PBKDF2) || opt_hash)) {
|
if (opt_pbkdf || opt_hash) {
|
||||||
|
if (!opt_pbkdf && opt_hash)
|
||||||
|
opt_pbkdf = CRYPT_KDF_PBKDF2;
|
||||||
r = action_benchmark_kdf(opt_pbkdf, opt_hash, key_size);
|
r = action_benchmark_kdf(opt_pbkdf, opt_hash, key_size);
|
||||||
} else if (opt_cipher) {
|
} else if (opt_cipher) {
|
||||||
r = crypt_parse_name_and_mode(opt_cipher, cipher, NULL, cipher_mode);
|
r = crypt_parse_name_and_mode(opt_cipher, cipher, NULL, cipher_mode);
|
||||||
|
|||||||
Reference in New Issue
Block a user