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 900c3f93d..41d9bd4d1 100644
--- a/src/wrap/python/rsa.cpp
+++ b/src/wrap/python/rsa.cpp
@@ -55,7 +55,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());
@@ -66,7 +66,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()));
@@ -144,7 +144,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());
@@ -156,7 +156,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());