aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2006-09-10 22:37:54 +0000
committerlloyd <[email protected]>2006-09-10 22:37:54 +0000
commita563159b999eea2fee0ea94d0baaea06df0ca1df (patch)
tree34209aaafe7e41964d278b46d2b016f3f9e7701d
parent380733dfe8448c5d4c8acdd885039b87bbbea212 (diff)
Remove a useless wrapper function.
-rw-r--r--src/def_mode.cpp23
1 files changed, 6 insertions, 17 deletions
diff --git a/src/def_mode.cpp b/src/def_mode.cpp
index ca9692128..200036f09 100644
--- a/src/def_mode.cpp
+++ b/src/def_mode.cpp
@@ -17,13 +17,11 @@
namespace Botan {
-namespace {
-
/*************************************************
* Get a cipher object *
*************************************************/
-Keyed_Filter* do_get_cipher(const std::string& algo_spec,
- Cipher_Dir direction)
+Keyed_Filter* Default_Engine::get_cipher(const std::string& algo_spec,
+ Cipher_Dir direction)
{
std::vector<std::string> algo_parts = split_on(algo_spec, '/');
if(algo_parts.empty())
@@ -69,8 +67,10 @@ Keyed_Filter* do_get_cipher(const std::string& algo_spec,
else if((mode != "CBC" && mode != "ECB") && padding != "NoPadding")
throw Invalid_Algorithm_Name(algo_spec);
- if(mode == "OFB") return new OFB(cipher);
- else if(mode == "CTR-BE") return new CTR_BE(cipher);
+ if(mode == "OFB")
+ return new OFB(cipher);
+ else if(mode == "CTR-BE")
+ return new CTR_BE(cipher);
else if(mode == "ECB" || mode == "CBC" || mode == "CTS" ||
mode == "CFB" || mode == "EAX")
{
@@ -121,14 +121,3 @@ Keyed_Filter* do_get_cipher(const std::string& algo_spec,
}
}
-
-/*************************************************
-* Get a cipher object *
-*************************************************/
-Keyed_Filter* Default_Engine::get_cipher(const std::string& algo_spec,
- Cipher_Dir direction)
- {
- return do_get_cipher(algo_spec, direction);
- }
-
-}