aboutsummaryrefslogtreecommitdiffstats
path: root/src/wrap/python/rsa.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wrap/python/rsa.cpp')
-rw-r--r--src/wrap/python/rsa.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wrap/python/rsa.cpp b/src/wrap/python/rsa.cpp
index 2aa30efd7..903516f11 100644
--- a/src/wrap/python/rsa.cpp
+++ b/src/wrap/python/rsa.cpp
@@ -63,7 +63,7 @@ class Py_RSA_PrivateKey
std::string Py_RSA_PrivateKey::decrypt(const std::string& in,
const std::string& padding)
{
- std::auto_ptr<PK_Decryptor> enc(get_pk_decryptor(*rsa_key, padding));
+ std::unique_ptr<PK_Decryptor> enc(get_pk_decryptor(*rsa_key, padding));
const byte* in_bytes = reinterpret_cast<const byte*>(in.data());
@@ -74,7 +74,7 @@ std::string Py_RSA_PrivateKey::sign(const std::string& in,
const std::string& padding,
Python_RandomNumberGenerator& rng)
{
- std::auto_ptr<PK_Signer> sign(get_pk_signer(*rsa_key, padding));
+ std::unique_ptr<PK_Signer> sign(get_pk_signer(*rsa_key, padding));
const byte* in_bytes = reinterpret_cast<const byte*>(in.data());
sign->update(in_bytes, in.size());
return make_string(sign->signature(rng.get_underlying_rng()));
@@ -160,7 +160,7 @@ std::string Py_RSA_PublicKey::encrypt(const std::string& in,
const std::string& padding,
Python_RandomNumberGenerator& rng)
{
- std::auto_ptr<PK_Encryptor> enc(get_pk_encryptor(*rsa_key, padding));
+ std::unique_ptr<PK_Encryptor> enc(get_pk_encryptor(*rsa_key, padding));
const byte* in_bytes = reinterpret_cast<const byte*>(in.data());
@@ -172,7 +172,7 @@ bool Py_RSA_PublicKey::verify(const std::string& in,
const std::string& signature,
const std::string& padding)
{
- std::auto_ptr<PK_Verifier> ver(get_pk_verifier(*rsa_key, padding));
+ std::unique_ptr<PK_Verifier> ver(get_pk_verifier(*rsa_key, padding));
const byte* in_bytes = reinterpret_cast<const byte*>(in.data());
const byte* sig_bytes = reinterpret_cast<const byte*>(signature.data());