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.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/algo_factory/algo_factory.cpp b/src/algo_factory/algo_factory.cpp
index 16ac589a1..6bd66d349 100644
--- a/src/algo_factory/algo_factory.cpp
+++ b/src/algo_factory/algo_factory.cpp
@@ -108,13 +108,17 @@ Algorithm_Factory::~Algorithm_Factory()
std::for_each(engines.begin(), engines.end(), del_fun<Engine>());
}
-void Algorithm_Factory::add_engine(Engine* engine)
+void Algorithm_Factory::clear_caches()
{
block_cipher_cache->clear_cache();
stream_cipher_cache->clear_cache();
hash_cache->clear_cache();
mac_cache->clear_cache();
+ }
+void Algorithm_Factory::add_engine(Engine* engine)
+ {
+ clear_caches();
engines.push_back(engine);
}