diff options
author | lloyd <[email protected]> | 2011-07-12 11:52:39 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2011-07-12 11:52:39 +0000 |
commit | 9e84dbf6c6ee9297f2a707f49d1cf175b6e149a5 (patch) | |
tree | e93fc28388c762d11bae0a52edcc17576a2ae1f6 /src/algo_factory/algo_factory.cpp | |
parent | 82e218500e6f305d02feecc000b43a5d9448e11a (diff) | |
parent | dcc7e959eff557811c3cf414adde096285821816 (diff) |
propagate from branch 'net.randombit.botan' (head 23a326fa36a31dd39347a8864e1f5740669a905e)
to branch 'net.randombit.botan.cxx11' (head 9d3ac8dd45f7673c85dca41968e7750acc90bdff)
Diffstat (limited to 'src/algo_factory/algo_factory.cpp')
-rw-r--r-- | src/algo_factory/algo_factory.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/algo_factory/algo_factory.cpp b/src/algo_factory/algo_factory.cpp index 3d640ab8a..9e4f78569 100644 --- a/src/algo_factory/algo_factory.cpp +++ b/src/algo_factory/algo_factory.cpp @@ -94,13 +94,13 @@ 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()); - pbkdf_cache = new Algorithm_Cache<PBKDF>(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>(); + pbkdf_cache = new Algorithm_Cache<PBKDF>(); } /* @@ -114,7 +114,8 @@ Algorithm_Factory::~Algorithm_Factory() delete mac_cache; delete pbkdf_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() |