diff options
author | lloyd <[email protected]> | 2008-11-10 02:53:24 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-11-10 02:53:24 +0000 |
commit | cabd8859a0cd87cf78ef1a48a8d59bf4a6fae81c (patch) | |
tree | cb9a786f4129e4861bd63b7c5152981304e945bf /src/libstate/engine/engine.cpp | |
parent | ba1271baf1ccbc0302971e7300229d0dec0405ab (diff) |
Remove support for block cipher padding methods in engine. Like S2K,
they were not used at all outside of the core library implementations.
One change is that now get_bc_pad returns a new object, instead of a
pointer to a const shared padding method. This does imply a bit more
dynamic memory overhead, but the modes are pretty light (stateless, for
the most part), so this doesn't seem like a big deal. So modify ECB and
CBC classes to add destructors to delete the padding object.
Diffstat (limited to 'src/libstate/engine/engine.cpp')
-rw-r--r-- | src/libstate/engine/engine.cpp | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/src/libstate/engine/engine.cpp b/src/libstate/engine/engine.cpp index b5d48a0ca..95111014e 100644 --- a/src/libstate/engine/engine.cpp +++ b/src/libstate/engine/engine.cpp @@ -100,16 +100,6 @@ const MessageAuthenticationCode* Engine::mac(const std::string& name) const } /************************************************* -* Acquire a cipher padding object * -*************************************************/ -const BlockCipherModePaddingMethod* -Engine::bc_pad(const std::string& name) const - { - return lookup_algo(cache_of_bc_pad, global_state().deref_alias(name), - this, &Engine::find_bc_pad); - } - -/************************************************* * Add a block cipher to the lookup table * *************************************************/ void Engine::add_algorithm(BlockCipher* algo) const @@ -142,14 +132,6 @@ void Engine::add_algorithm(MessageAuthenticationCode* algo) const } /************************************************* -* Add a cipher pad method to the lookup table * -*************************************************/ -void Engine::add_algorithm(BlockCipherModePaddingMethod* algo) const - { - cache_of_bc_pad->add(algo); - } - -/************************************************* * Create an Engine * *************************************************/ Engine::Engine() @@ -158,8 +140,6 @@ Engine::Engine() cache_of_sc = new Algorithm_Cache_Impl<StreamCipher>(); cache_of_hf = new Algorithm_Cache_Impl<HashFunction>(); cache_of_mac = new Algorithm_Cache_Impl<MessageAuthenticationCode>(); - cache_of_bc_pad = - new Algorithm_Cache_Impl<BlockCipherModePaddingMethod>(); } /************************************************* @@ -171,7 +151,6 @@ Engine::~Engine() delete cache_of_sc; delete cache_of_hf; delete cache_of_mac; - delete cache_of_bc_pad; } namespace Engine_Core { |