aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/block/block_cipher.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2015-09-19 07:43:45 -0400
committerJack Lloyd <[email protected]>2015-09-19 07:43:45 -0400
commite1ae1d68309573134fc1242c3bfb8a8ce0672737 (patch)
treed4cbfc7b2c1f70d06fa57403f533be5e434c869f /src/lib/block/block_cipher.cpp
parente2e0f8f2b595122c1f8acb3b3a46501f96a2b218 (diff)
Internal header cleanups
Only user-visible change is the removal of get_byte.h
Diffstat (limited to 'src/lib/block/block_cipher.cpp')
-rw-r--r--src/lib/block/block_cipher.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/lib/block/block_cipher.cpp b/src/lib/block/block_cipher.cpp
index 60e6d0db2..e4d6c5817 100644
--- a/src/lib/block/block_cipher.cpp
+++ b/src/lib/block/block_cipher.cpp
@@ -7,7 +7,7 @@
#include <botan/block_cipher.h>
#include <botan/cpuid.h>
-#include <botan/internal/block_utils.h>
+#include <botan/internal/algo_registry.h>
#if defined(BOTAN_HAS_SIMD_32)
#include <botan/internal/simd_32.h>
@@ -162,6 +162,21 @@ std::vector<std::string> BlockCipher::providers(const std::string& algo_spec)
return providers_of<BlockCipher>(BlockCipher::Spec(algo_spec));
}
+#define BOTAN_REGISTER_BLOCK_CIPHER(name, maker) BOTAN_REGISTER_T(BlockCipher, name, maker)
+#define BOTAN_REGISTER_BLOCK_CIPHER_NOARGS(name) BOTAN_REGISTER_T_NOARGS(BlockCipher, name)
+
+#define BOTAN_REGISTER_BLOCK_CIPHER_1LEN(name, def) BOTAN_REGISTER_T_1LEN(BlockCipher, name, def)
+
+#define BOTAN_REGISTER_BLOCK_CIPHER_NAMED_NOARGS(type, name) \
+ BOTAN_REGISTER_NAMED_T(BlockCipher, name, type, make_new_T<type>)
+#define BOTAN_REGISTER_BLOCK_CIPHER_NAMED_1LEN(type, name, def) \
+ BOTAN_REGISTER_NAMED_T(BlockCipher, name, type, (make_new_T_1len<type,def>))
+#define BOTAN_REGISTER_BLOCK_CIPHER_NAMED_1STR(type, name, def) \
+ BOTAN_REGISTER_NAMED_T(BlockCipher, name, type, std::bind(make_new_T_1str<type>, std::placeholders::_1, def))
+
+#define BOTAN_REGISTER_BLOCK_CIPHER_NOARGS_IF(cond, type, name, provider, pref) \
+ BOTAN_COND_REGISTER_NAMED_T_NOARGS(cond, BlockCipher, type, name, provider, pref)
+
#if defined(BOTAN_HAS_AES)
BOTAN_REGISTER_BLOCK_CIPHER_NAMED_NOARGS(AES_128, "AES-128");
BOTAN_REGISTER_BLOCK_CIPHER_NAMED_NOARGS(AES_192, "AES-192");