diff options
author | lloyd <[email protected]> | 2010-07-09 20:28:29 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-07-09 20:28:29 +0000 |
commit | 91137b44613c7ed5a12a1c64a6fd3e119828c43c (patch) | |
tree | 60d3728bc11356dc60b37859ac34f1d61138e82d /src/wrap | |
parent | a2775c5bd9f6979da3e1981cdb1dec250e274fea (diff) | |
parent | 54bac11c5d4e051f996951feb6a037b1de001329 (diff) |
propagate from branch 'net.randombit.botan' (head 161b5c0300b72baa746f101fda1e2b4a7c71818c)
to branch 'net.randombit.botan.c++0x' (head 1fc3875bb8daf4ad0e90ba66db72642203cb9984)
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 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()); |