aboutsummaryrefslogtreecommitdiffstats
path: root/src/pbe/pbes1/pbes1.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pbe/pbes1/pbes1.cpp')
-rw-r--r--src/pbe/pbes1/pbes1.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pbe/pbes1/pbes1.cpp b/src/pbe/pbes1/pbes1.cpp
index 1d851d1a5..36cfaa6b4 100644
--- a/src/pbe/pbes1/pbes1.cpp
+++ b/src/pbe/pbes1/pbes1.cpp
@@ -80,9 +80,9 @@ void PBE_PKCS5v15::set_key(const std::string& passphrase)
{
PKCS5_PBKDF1 pbkdf(hash_function->clone());
- pbkdf.set_iterations(iterations);
- pbkdf.change_salt(salt, salt.size());
- SymmetricKey key_and_iv = pbkdf.derive_key(16, passphrase);
+ SymmetricKey key_and_iv = pbkdf.derive_key(16, passphrase,
+ &salt[0], salt.size(),
+ iterations);
key.set(key_and_iv.begin(), 8);
iv.set(key_and_iv.begin() + 8, 8);