diff options
Diffstat (limited to 'src/wrap')
-rw-r--r-- | src/wrap/python/core.cpp | 2 | ||||
-rw-r--r-- | src/wrap/python/filter.cpp | 14 | ||||
-rw-r--r-- | src/wrap/python/rsa.cpp | 8 |
3 files changed, 12 insertions, 12 deletions
diff --git a/src/wrap/python/core.cpp b/src/wrap/python/core.cpp index b1be3b71f..67e17c4d5 100644 --- a/src/wrap/python/core.cpp +++ b/src/wrap/python/core.cpp @@ -178,7 +178,7 @@ std::string python_kdf2(const std::string& param, const std::string& masterkey, u32bit outputlength) { - std::auto_ptr<KDF> kdf(get_kdf("KDF2(SHA-1)")); + std::unique_ptr<KDF> kdf(get_kdf("KDF2(SHA-1)")); return make_string( kdf->derive_key(outputlength, diff --git a/src/wrap/python/filter.cpp b/src/wrap/python/filter.cpp index 48a3f84eb..0076f0c49 100644 --- a/src/wrap/python/filter.cpp +++ b/src/wrap/python/filter.cpp @@ -109,19 +109,19 @@ Filter* make_filter4(const std::string& name, name); } -void append_filter(Pipe& pipe, std::auto_ptr<Filter> filter) +void append_filter(Pipe& pipe, std::unique_ptr<Filter> filter) { pipe.append(filter.get()); filter.release(); } -void prepend_filter(Pipe& pipe, std::auto_ptr<Filter> filter) +void prepend_filter(Pipe& pipe, std::unique_ptr<Filter> filter) { pipe.prepend(filter.get()); filter.release(); } -void do_send(std::auto_ptr<FilterWrapper> filter, const std::string& data) +void do_send(std::unique_ptr<FilterWrapper> filter, const std::string& data) { printf("Sending %s to %p\n", data.c_str(), filter.get()); filter->send_str(data); @@ -131,7 +131,7 @@ BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(rallas_ovls, read_all_as_string, 0, 1) void export_filters() { - class_<Filter, std::auto_ptr<Filter>, boost::noncopyable> + class_<Filter, std::unique_ptr<Filter>, boost::noncopyable> ("__Internal_FilterObj", no_init); def("make_filter", make_filter1, @@ -145,7 +145,7 @@ void export_filters() // This might not work - Pipe will delete the filter, but Python // might have allocated the space with malloc() or who-knows-what -> bad - class_<FilterWrapper, std::auto_ptr<FilterWrapper>, + class_<FilterWrapper, std::unique_ptr<FilterWrapper>, bases<Filter>, boost::noncopyable> ("FilterObj") .def("write", pure_virtual(&Py_Filter::write_str)) @@ -153,8 +153,8 @@ void export_filters() .def("start_msg", &Filter::start_msg, &FilterWrapper::default_start_msg) .def("end_msg", &Filter::end_msg, &FilterWrapper::default_end_msg); - implicitly_convertible<std::auto_ptr<FilterWrapper>, - std::auto_ptr<Filter> >(); + implicitly_convertible<std::unique_ptr<FilterWrapper>, + std::unique_ptr<Filter> >(); void (Pipe::*pipe_write_str)(const std::string&) = &Pipe::write; void (Pipe::*pipe_process_str)(const std::string&) = &Pipe::process_msg; 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()); |