aboutsummaryrefslogtreecommitdiffstats
path: root/src/algo_factory/algo_factory.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-10-13 03:25:16 +0000
committerlloyd <[email protected]>2010-10-13 03:25:16 +0000
commitba142ed2eaa21445d49cbbc8ae3b3d4dc625b9d7 (patch)
treebe1a9fa07d0ea26fd7713bb52205f7a3bcc3e907 /src/algo_factory/algo_factory.cpp
parent406d4f8556d41083bfa551e7a777b0cb02925b6c (diff)
parent5913bf42b4c32e43d0db11bf9299130f3b0b62a4 (diff)
propagate from branch 'net.randombit.botan' (head 2898d79f992f27a328a3e41d34b46eb1052da0de)
to branch 'net.randombit.botan.c++0x' (head 6cba76268fd69a73195760c021b7f881b8a6552c)
Diffstat (limited to 'src/algo_factory/algo_factory.cpp')
-rw-r--r--src/algo_factory/algo_factory.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/algo_factory/algo_factory.cpp b/src/algo_factory/algo_factory.cpp
index ba4a435d7..9859a3bca 100644
--- a/src/algo_factory/algo_factory.cpp
+++ b/src/algo_factory/algo_factory.cpp
@@ -87,12 +87,12 @@ const T* factory_prototype(const std::string& algo_spec,
/*
* Setup caches
*/
-Algorithm_Factory::Algorithm_Factory(Mutex_Factory& mf)
+Algorithm_Factory::Algorithm_Factory()
{
- block_cipher_cache = new Algorithm_Cache<BlockCipher>(mf.make());
- stream_cipher_cache = new Algorithm_Cache<StreamCipher>(mf.make());
- hash_cache = new Algorithm_Cache<HashFunction>(mf.make());
- mac_cache = new Algorithm_Cache<MessageAuthenticationCode>(mf.make());
+ block_cipher_cache = new Algorithm_Cache<BlockCipher>();
+ stream_cipher_cache = new Algorithm_Cache<StreamCipher>();
+ hash_cache = new Algorithm_Cache<HashFunction>();
+ mac_cache = new Algorithm_Cache<MessageAuthenticationCode>();
}
/*
@@ -105,7 +105,8 @@ Algorithm_Factory::~Algorithm_Factory()
delete hash_cache;
delete mac_cache;
- std::for_each(engines.begin(), engines.end(), del_fun<Engine>());
+ for(auto i = engines.begin(); i != engines.end(); ++i)
+ delete *i;
}
void Algorithm_Factory::clear_caches()