aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/base
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-01-12 10:35:55 -0500
committerJack Lloyd <[email protected]>2018-01-12 11:34:29 -0500
commit2031badab44efad536509ac4c0c2f3ea1928de0a (patch)
treeeb7cc8239223d7507863000bcdad8440b8c6b32b /src/lib/base
parentaee4203df5d1b7437fccd0b134ce8190daea0cd0 (diff)
Make stream, block, hash and cipher mode base classes optional
Diffstat (limited to 'src/lib/base')
-rw-r--r--src/lib/base/info.txt4
-rw-r--r--src/lib/base/lookup.h27
2 files changed, 24 insertions, 7 deletions
diff --git a/src/lib/base/info.txt b/src/lib/base/info.txt
index c5f89f470..fd3f7b890 100644
--- a/src/lib/base/info.txt
+++ b/src/lib/base/info.txt
@@ -11,11 +11,7 @@ symkey.h
</header:public>
<requires>
-block
-hash
hex
-modes
rng
-stream
utils
</requires>
diff --git a/src/lib/base/lookup.h b/src/lib/base/lookup.h
index 18c885d16..1cfa7d3c9 100644
--- a/src/lib/base/lookup.h
+++ b/src/lib/base/lookup.h
@@ -9,14 +9,23 @@
#define BOTAN_LOOKUP_H_
#include <botan/build.h>
-#include <botan/block_cipher.h>
-#include <botan/stream_cipher.h>
-#include <botan/hash.h>
#include <botan/exceptn.h>
#include <string>
#include <vector>
#include <memory>
+#if defined(BOTAN_HAS_BLOCK_CIPHER)
+ #include <botan/block_cipher.h>
+#endif
+
+#if defined(BOTAN_HAS_STREAM_CIPHER)
+ #include <botan/stream_cipher.h>
+#endif
+
+#if defined(BOTAN_HAS_HASH)
+ #include <botan/hash.h>
+#endif
+
#if defined(BOTAN_HAS_MAC)
#include <botan/mac.h>
#endif
@@ -34,6 +43,8 @@ namespace Botan {
* caller assume ownership of them
*/
+#if defined(BOTAN_HAS_BLOCK_CIPHER)
+
/**
* Block cipher factory method.
*
@@ -61,6 +72,10 @@ inline std::vector<std::string> get_block_cipher_providers(const std::string& al
return BlockCipher::providers(algo_spec);
}
+#endif
+
+#if defined(BOTAN_HAS_STREAM_CIPHER)
+
/**
* Stream cipher factory method.
*
@@ -88,6 +103,10 @@ inline std::vector<std::string> get_stream_cipher_providers(const std::string& a
return StreamCipher::providers(algo_spec);
}
+#endif
+
+#if defined(BOTAN_HAS_HASH)
+
/**
* Hash function factory method.
*
@@ -122,6 +141,8 @@ inline std::vector<std::string> get_hash_function_providers(const std::string& a
return HashFunction::providers(algo_spec);
}
+#endif
+
#if defined(BOTAN_HAS_MAC)
/**
* MAC factory method.