aboutsummaryrefslogtreecommitdiffstats
path: root/src/pbkdf
diff options
context:
space:
mode:
Diffstat (limited to 'src/pbkdf')
-rw-r--r--src/pbkdf/pbkdf2/pbkdf2.cpp2
-rw-r--r--src/pbkdf/pgps2k/pgp_s2k.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/pbkdf/pbkdf2/pbkdf2.cpp b/src/pbkdf/pbkdf2/pbkdf2.cpp
index 7e4d1cd8a..39d53d417 100644
--- a/src/pbkdf/pbkdf2/pbkdf2.cpp
+++ b/src/pbkdf/pbkdf2/pbkdf2.cpp
@@ -30,7 +30,7 @@ OctetString PKCS5_PBKDF2::derive_key(size_t key_len,
catch(Invalid_Key_Length)
{
throw Exception(name() + " cannot accept passphrases of length " +
- to_string(passphrase.length()));
+ std::to_string(passphrase.length()));
}
SecureVector<byte> key(key_len);
diff --git a/src/pbkdf/pgps2k/pgp_s2k.cpp b/src/pbkdf/pgps2k/pgp_s2k.cpp
index 9cec7304c..4ee4c6bd9 100644
--- a/src/pbkdf/pgps2k/pgp_s2k.cpp
+++ b/src/pbkdf/pgps2k/pgp_s2k.cpp
@@ -46,7 +46,7 @@ OctetString OpenPGP_S2K::derive_key(size_t key_len,
}
hash_buf = hash->final();
- key.copy(generated, &hash_buf[0], hash->output_length());
+ buffer_insert(key, generated, &hash_buf[0], hash->output_length());
generated += hash->output_length();
++pass;
}