aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-04-10 05:52:37 +0000
committerlloyd <[email protected]>2008-04-10 05:52:37 +0000
commitf15ca39257de8983babb95f7f5d589a4e555a864 (patch)
tree3f41f5e38cc5d07e3241db716d582fa146a4ac3d /src/modules.cpp
parent59e71322cad61ff2f09664fc3e59b5446af4566a (diff)
parent9ec64ce60cad6c825b7cf40306a359d019e2c13c (diff)
propagate from branch 'net.randombit.botan' (head 6afe2db1f710f75bc27e189bb8bdb23613ce1ca3)
to branch 'net.randombit.botan.remove-libstate' (head e40f0dbdfd847024c30fa0092c2acefc19a550b8)
Diffstat (limited to 'src/modules.cpp')
-rw-r--r--src/modules.cpp39
1 files changed, 12 insertions, 27 deletions
diff --git a/src/modules.cpp b/src/modules.cpp
index dc7dc917f..ffce244d1 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -5,7 +5,6 @@
#include <botan/modules.h>
#include <botan/defalloc.h>
-#include <botan/def_char.h>
#include <botan/eng_def.h>
#include <botan/timers.h>
#include <botan/parsing.h>
@@ -95,24 +94,6 @@ Mutex_Factory* Builtin_Modules::mutex_factory() const
}
/*************************************************
-* Find a high resolution timer, if possible *
-*************************************************/
-Timer* Builtin_Modules::timer() const
- {
-#if defined(BOTAN_EXT_TIMER_HARDWARE)
- return new Hardware_Timer;
-#elif defined(BOTAN_EXT_TIMER_POSIX)
- return new POSIX_Timer;
-#elif defined(BOTAN_EXT_TIMER_UNIX)
- return new Unix_Timer;
-#elif defined(BOTAN_EXT_TIMER_WIN32)
- return new Win32_Timer;
-#else
- return new Timer;
-#endif
- }
-
-/*************************************************
* Find any usable allocators *
*************************************************/
std::vector<Allocator*> Builtin_Modules::allocators() const
@@ -153,6 +134,18 @@ std::vector<EntropySource*> Builtin_Modules::entropy_sources() const
{
std::vector<EntropySource*> sources;
+#if defined(BOTAN_EXT_TIMER_HARDWARE)
+ sources.push_back(new Hardware_Timer);
+#elif defined(BOTAN_EXT_TIMER_POSIX)
+ sources.push_back(new POSIX_Timer);
+#elif defined(BOTAN_EXT_TIMER_UNIX)
+ sources.push_back(new Unix_Timer);
+#elif defined(BOTAN_EXT_TIMER_WIN32)
+ sources.push_back(new Win32_Timer);
+#else
+ sources.push_back(new Timer);
+#endif
+
#if defined(BOTAN_EXT_ENTROPY_SRC_AEP)
sources.push_back(new AEP_EntropySource);
#endif
@@ -217,14 +210,6 @@ std::vector<Engine*> Builtin_Modules::engines() const
}
/*************************************************
-* Find the best transcoder option *
-*************************************************/
-Charset_Transcoder* Builtin_Modules::transcoder() const
- {
- return new Default_Charset_Transcoder;
- }
-
-/*************************************************
* Builtin_Modules Constructor *
*************************************************/
Builtin_Modules::Builtin_Modules(const InitializerOptions& args) :