aboutsummaryrefslogtreecommitdiffstats
path: root/src/wrap
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-09-03 13:55:19 +0000
committerlloyd <[email protected]>2010-09-03 13:55:19 +0000
commit7e54763ea43c8b34729387c7429922dd981c4f5b (patch)
tree33a1bd0f32e4ab7958a484e468316291c527dd24 /src/wrap
parentfb68795162b8d107cbd284c4a75d8e13ce589829 (diff)
parentec8c59af3db02ff159908f9a446e53c4ea20d474 (diff)
propagate from branch 'net.randombit.botan' (head a29c41b4a949207b1544096c3afab668f8b5179e)
to branch 'net.randombit.botan.c++0x' (head a9d0c2f805b3c20a4c648575d7256959db8329fe)
Diffstat (limited to 'src/wrap')
-rw-r--r--src/wrap/python/core.cpp2
-rw-r--r--src/wrap/python/filter.cpp14
-rw-r--r--src/wrap/python/rsa.cpp8
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 343c0831b..a2ad620de 100644
--- a/src/wrap/python/filter.cpp
+++ b/src/wrap/python/filter.cpp
@@ -111,19 +111,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);
@@ -133,7 +133,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,
@@ -147,7 +147,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))
@@ -155,8 +155,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 cbccf96e8..fd9fff37e 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());