aboutsummaryrefslogtreecommitdiffstats
path: root/src/pbe/pbes2/pbes2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pbe/pbes2/pbes2.cpp')
-rw-r--r--src/pbe/pbes2/pbes2.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pbe/pbes2/pbes2.cpp b/src/pbe/pbes2/pbes2.cpp
index bd24c449b..63772263f 100644
--- a/src/pbe/pbes2/pbes2.cpp
+++ b/src/pbe/pbes2/pbes2.cpp
@@ -87,9 +87,9 @@ void PBE_PKCS5v20::set_key(const std::string& passphrase)
{
PKCS5_PBKDF2 pbkdf(new HMAC(hash_function->clone()));
- pbkdf.set_iterations(iterations);
- pbkdf.change_salt(salt, salt.size());
- key = pbkdf.derive_key(key_length, passphrase).bits_of();
+ key = pbkdf.derive_key(key_length, passphrase,
+ &salt[0], salt.size(),
+ iterations).bits_of();
}
/**