diff options
Diffstat (limited to 'src/lib/block/cascade')
-rw-r--r-- | src/lib/block/cascade/cascade.cpp | 9 | ||||
-rw-r--r-- | src/lib/block/cascade/cascade.h | 2 |
2 files changed, 4 insertions, 7 deletions
diff --git a/src/lib/block/cascade/cascade.cpp b/src/lib/block/cascade/cascade.cpp index 6c0458265..c80bfbc68 100644 --- a/src/lib/block/cascade/cascade.cpp +++ b/src/lib/block/cascade/cascade.cpp @@ -6,14 +6,13 @@ */ #include <botan/internal/block_utils.h> -#include <botan/algo_registry.h> #include <botan/cascade.h> namespace Botan { -namespace { +BOTAN_REGISTER_NAMED_T(BlockCipher, "Cascade", Cascade_Cipher, Cascade_Cipher::make); -Cascade_Cipher* make_cascade(const BlockCipher::Spec& spec) +Cascade_Cipher* Cascade_Cipher::make(const BlockCipher::Spec& spec) { auto& block_cipher = Algo_Registry<BlockCipher>::global_registry(); std::unique_ptr<BlockCipher> c1(block_cipher.make(spec.arg(0))); @@ -24,10 +23,6 @@ Cascade_Cipher* make_cascade(const BlockCipher::Spec& spec) return nullptr; } -} - -BOTAN_REGISTER_NAMED_T(BlockCipher, "Cascade", Cascade_Cipher, make_cascade); - void Cascade_Cipher::encrypt_n(const byte in[], byte out[], size_t blocks) const { diff --git a/src/lib/block/cascade/cascade.h b/src/lib/block/cascade/cascade.h index 440f5c8f4..e96c34549 100644 --- a/src/lib/block/cascade/cascade.h +++ b/src/lib/block/cascade/cascade.h @@ -33,6 +33,8 @@ class BOTAN_DLL Cascade_Cipher : public BlockCipher std::string name() const; BlockCipher* clone() const; + static Cascade_Cipher* make(const Spec& spec); + /** * Create a cascade of two block ciphers * @param cipher1 the first cipher |