aboutsummaryrefslogtreecommitdiffstats
path: root/src/algo_factory/algo_factory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/algo_factory/algo_factory.cpp')
-rw-r--r--src/algo_factory/algo_factory.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/algo_factory/algo_factory.cpp b/src/algo_factory/algo_factory.cpp
index 05de330c3..07a072f22 100644
--- a/src/algo_factory/algo_factory.cpp
+++ b/src/algo_factory/algo_factory.cpp
@@ -83,10 +83,8 @@ const T* factory_prototype(const std::string& algo_spec,
/**
* Setup caches
*/
-Algorithm_Factory::Algorithm_Factory(const std::vector<Engine*>& engines_in)
+Algorithm_Factory::Algorithm_Factory()
{
- engines = engines_in;
-
block_cipher_cache = new Algorithm_Cache<BlockCipher>();
stream_cipher_cache = new Algorithm_Cache<StreamCipher>();
hash_cache = new Algorithm_Cache<HashFunction>();
@@ -107,6 +105,11 @@ Algorithm_Factory::~Algorithm_Factory()
delete mac_cache;
}
+void Algorithm_Factory::add_engine(Engine* engine)
+ {
+ engines.push_back(engine);
+ }
+
/**
* Set the preferred provider for an algorithm
*/