diff options
author | Jack Lloyd <[email protected]> | 2016-10-11 13:00:57 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-10-21 16:53:16 -0400 |
commit | 558808900bffc3c48da5e6d79ba602e88e619154 (patch) | |
tree | fd76ee2d009c2b707d888683cbd767351c4ff6b3 /src/lib/block/block_cipher.h | |
parent | 6aa855bba613c7b6fedfbe71d15930964acb1633 (diff) |
Remove Algo_Registry
I repent my use of global constructors.
I repent my use of global locks.
Hopefully I will never touch this code again.
:)
Diffstat (limited to 'src/lib/block/block_cipher.h')
-rw-r--r-- | src/lib/block/block_cipher.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/lib/block/block_cipher.h b/src/lib/block/block_cipher.h index 7c7084155..2062160bc 100644 --- a/src/lib/block/block_cipher.h +++ b/src/lib/block/block_cipher.h @@ -8,7 +8,6 @@ #ifndef BOTAN_BLOCK_CIPHER_H__ #define BOTAN_BLOCK_CIPHER_H__ -#include <botan/scan_name.h> #include <botan/sym_algo.h> #include <string> @@ -20,7 +19,6 @@ namespace Botan { class BOTAN_DLL BlockCipher : public SymmetricAlgorithm { public: - typedef SCAN_Name Spec; /** * Create an instance based on a name @@ -29,8 +27,18 @@ class BOTAN_DLL BlockCipher : public SymmetricAlgorithm * @param provider provider implementation to choose * @return a null pointer if the algo/provider combination cannot be found */ - static std::unique_ptr<BlockCipher> create(const std::string& algo_spec, - const std::string& provider = ""); + static std::unique_ptr<BlockCipher> + create(const std::string& algo_spec, + const std::string& provider = ""); + + /** + * Create an instance based on a name, or throw if the + * algo/provider combination cannot be found. If provider is + * empty then best available is chosen. + */ + static std::unique_ptr<BlockCipher> + create_or_throw(const std::string& algo_spec, + const std::string& provider = ""); /** * @return list of available providers for this algorithm, empty if not available @@ -165,7 +173,7 @@ class BOTAN_DLL BlockCipher : public SymmetricAlgorithm */ virtual BlockCipher* clone() const = 0; - virtual ~BlockCipher(); + virtual ~BlockCipher() {} }; /** |