aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstate/engine
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstate/engine')
-rw-r--r--src/libstate/engine/def_engine/def_eng.h3
-rw-r--r--src/libstate/engine/def_engine/info.txt1
-rw-r--r--src/libstate/engine/def_engine/lookup_bc_pad.cpp40
-rw-r--r--src/libstate/engine/engine.cpp21
-rw-r--r--src/libstate/engine/engine.h8
5 files changed, 0 insertions, 73 deletions
diff --git a/src/libstate/engine/def_engine/def_eng.h b/src/libstate/engine/def_engine/def_eng.h
index 4f1bd89a7..377333856 100644
--- a/src/libstate/engine/def_engine/def_eng.h
+++ b/src/libstate/engine/def_engine/def_eng.h
@@ -63,9 +63,6 @@ class BOTAN_DLL Default_Engine : public Engine
StreamCipher* find_stream_cipher(const std::string&) const;
HashFunction* find_hash(const std::string&) const;
MessageAuthenticationCode* find_mac(const std::string&) const;
-
- class BlockCipherModePaddingMethod*
- find_bc_pad(const std::string&) const;
};
}
diff --git a/src/libstate/engine/def_engine/info.txt b/src/libstate/engine/def_engine/info.txt
index da2683bb7..503a4392f 100644
--- a/src/libstate/engine/def_engine/info.txt
+++ b/src/libstate/engine/def_engine/info.txt
@@ -9,7 +9,6 @@ def_eng.h
def_mode.cpp
def_pk_ops.cpp
def_powm.cpp
-lookup_bc_pad.cpp
lookup_block.cpp
lookup_hash.cpp
lookup_mac.cpp
diff --git a/src/libstate/engine/def_engine/lookup_bc_pad.cpp b/src/libstate/engine/def_engine/lookup_bc_pad.cpp
deleted file mode 100644
index 0ed5267f6..000000000
--- a/src/libstate/engine/def_engine/lookup_bc_pad.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-/*************************************************
-* Block Cipher Padding Lookup *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
-
-#include <botan/def_eng.h>
-#include <botan/scan_name.h>
-
-#if defined(BOTAN_HAS_CIPHER_MODE_PADDING)
- #include <botan/mode_pad.h>
-#endif
-
-namespace Botan {
-
-/*************************************************
-* Look for an algorithm with this name *
-*************************************************/
-BlockCipherModePaddingMethod*
-Default_Engine::find_bc_pad(const std::string& algo_spec) const
- {
- SCAN_Name request(algo_spec);
-
-#if defined(BOTAN_HAS_CIPHER_MODE_PADDING)
- if(request.algo_name() == "PKCS7")
- return new PKCS7_Padding;
-
- if(request.algo_name() == "OneAndZeros")
- return new OneAndZeros_Padding;
-
- if(request.algo_name() == "X9.23")
- return new ANSI_X923_Padding;
-
- if(request.algo_name() == "NoPadding")
- return new Null_Padding;
-#endif
-
- return 0;
- }
-
-}
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 {
diff --git a/src/libstate/engine/engine.h b/src/libstate/engine/engine.h
index 584219045..9e83ce97f 100644
--- a/src/libstate/engine/engine.h
+++ b/src/libstate/engine/engine.h
@@ -119,8 +119,6 @@ class BOTAN_DLL Engine
const StreamCipher* stream_cipher(const std::string&) const;
const HashFunction* hash(const std::string&) const;
const MessageAuthenticationCode* mac(const std::string&) const;
- const class BlockCipherModePaddingMethod*
- bc_pad(const std::string&) const;
virtual bool can_add_algorithms() { return false; }
@@ -128,7 +126,6 @@ class BOTAN_DLL Engine
void add_algorithm(StreamCipher*) const;
void add_algorithm(HashFunction*) const;
void add_algorithm(MessageAuthenticationCode*) const;
- void add_algorithm(class BlockCipherModePaddingMethod*) const;
Engine();
virtual ~Engine();
@@ -145,10 +142,6 @@ class BOTAN_DLL Engine
virtual MessageAuthenticationCode* find_mac(const std::string&) const
{ return 0; }
- virtual class BlockCipherModePaddingMethod*
- find_bc_pad(const std::string&) const
- { return 0; }
-
template<typename T>
const T* lookup_algo(const Algorithm_Cache<T>* cache,
const std::string& name,
@@ -169,7 +162,6 @@ class BOTAN_DLL Engine
Algorithm_Cache<StreamCipher>* cache_of_sc;
Algorithm_Cache<HashFunction>* cache_of_hf;
Algorithm_Cache<MessageAuthenticationCode>* cache_of_mac;
- Algorithm_Cache<BlockCipherModePaddingMethod>* cache_of_bc_pad;
};
namespace Engine_Core {