diff options
author | Jack Lloyd <[email protected]> | 2015-09-10 01:45:47 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2015-09-10 01:45:47 -0400 |
commit | d21de17f070863c7e0b7e8d254eb35689001a53a (patch) | |
tree | 2627df5d3c911a56dea6a56aeca693a73d66f85e /src/lib/block/lion | |
parent | a96a7b79662f5045f0810dfa5d5cb4ebbd04ae42 (diff) |
Fix static lib registration for block, hash, mac, stream, kdf
The support problems from having static libraries not work in the
obvious way will be endless trouble. Instead have each set of
registrations tag along in a source file for the basic type, at the
cost of some extra ifdefs. On shared libs this is harmless -
everything is going into the shared object anyway. With static libs,
this means pulling in a single block cipher pulls in the text of all
the them. But that's still strictly better than the amalgamation
(which is really pulling in everything), and it works (unlike status quo).
Diffstat (limited to 'src/lib/block/lion')
-rw-r--r-- | src/lib/block/lion/lion.cpp | 11 | ||||
-rw-r--r-- | src/lib/block/lion/lion.h | 2 |
2 files changed, 5 insertions, 8 deletions
diff --git a/src/lib/block/lion/lion.cpp b/src/lib/block/lion/lion.cpp index a487e3eb0..336828d89 100644 --- a/src/lib/block/lion/lion.cpp +++ b/src/lib/block/lion/lion.cpp @@ -5,15 +5,14 @@ * Botan is released under the Simplified BSD License (see license.txt) */ -#include <botan/internal/block_utils.h> #include <botan/lion.h> +#include <botan/lookup.h> #include <botan/parsing.h> +#include <botan/internal/xor_buf.h> namespace Botan { -namespace { - -Lion* make_lion(const BlockCipher::Spec& spec) +Lion* Lion::make(const BlockCipher::Spec& spec) { if(spec.arg_count_between(2, 3)) { @@ -29,10 +28,6 @@ Lion* make_lion(const BlockCipher::Spec& spec) return nullptr; } -} - -BOTAN_REGISTER_NAMED_T(BlockCipher, "Lion", Lion, make_lion); - /* * Lion Encryption */ diff --git a/src/lib/block/lion/lion.h b/src/lib/block/lion/lion.h index d03d1d1a0..116fa911b 100644 --- a/src/lib/block/lion/lion.h +++ b/src/lib/block/lion/lion.h @@ -39,6 +39,8 @@ class BOTAN_DLL Lion : public BlockCipher std::string name() const override; BlockCipher* clone() const override; + static Lion* make(const Spec&); + /** * @param hash the hash to use internally * @param cipher the stream cipher to use internally |