diff options
Diffstat (limited to 'src/lib/base/lookup.h')
-rw-r--r-- | src/lib/base/lookup.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/lib/base/lookup.h b/src/lib/base/lookup.h index 9595d1f06..8bf1d7ad4 100644 --- a/src/lib/base/lookup.h +++ b/src/lib/base/lookup.h @@ -20,6 +20,11 @@ namespace Botan { /* +* As of 1.11.26 this header is deprecated. Instead use the calls T::create and +* T::providers (as demonstrated in the implementation below). +*/ + +/* * Get an algorithm object * NOTE: these functions create and return new objects, letting the * caller assume ownership of them @@ -31,12 +36,14 @@ namespace Botan { * @param algo_spec the name of the desired block cipher * @return pointer to the block cipher object */ +BOTAN_DEPRECATED("Use BlockCipher::create") inline BlockCipher* get_block_cipher(const std::string& algo_spec, const std::string& provider = "") { return BlockCipher::create(algo_spec, provider).release(); } +BOTAN_DEPRECATED("Use BlockCipher::create") inline std::unique_ptr<BlockCipher> make_block_cipher(const std::string& algo_spec, const std::string& provider = "") { @@ -46,6 +53,7 @@ inline std::unique_ptr<BlockCipher> make_block_cipher(const std::string& algo_sp throw Algorithm_Not_Found(algo_spec); } +BOTAN_DEPRECATED("Use BlockCipher::providers") inline std::vector<std::string> get_block_cipher_providers(const std::string& algo_spec) { return BlockCipher::providers(algo_spec); @@ -57,12 +65,14 @@ inline std::vector<std::string> get_block_cipher_providers(const std::string& al * @param algo_spec the name of the desired stream cipher * @return pointer to the stream cipher object */ +BOTAN_DEPRECATED("Use StreamCipher::create") inline StreamCipher* get_stream_cipher(const std::string& algo_spec, const std::string& provider = "") { return StreamCipher::create(algo_spec, provider).release(); } +BOTAN_DEPRECATED("Use StreamCipher::create") inline std::unique_ptr<StreamCipher> make_stream_cipher(const std::string& algo_spec, const std::string& provider = "") { @@ -72,6 +82,7 @@ inline std::unique_ptr<StreamCipher> make_stream_cipher(const std::string& algo_ throw Algorithm_Not_Found(algo_spec); } +BOTAN_DEPRECATED("Use StreamCipher::providers") inline std::vector<std::string> get_stream_cipher_providers(const std::string& algo_spec) { return StreamCipher::providers(algo_spec); @@ -83,12 +94,14 @@ inline std::vector<std::string> get_stream_cipher_providers(const std::string& a * @param algo_spec the name of the desired hash function * @return pointer to the hash function object */ +BOTAN_DEPRECATED("Use HashFunction::create") inline HashFunction* get_hash_function(const std::string& algo_spec, const std::string& provider = "") { return HashFunction::create(algo_spec, provider).release(); } +BOTAN_DEPRECATED("Use HashFunction::create") inline std::unique_ptr<HashFunction> make_hash_function(const std::string& algo_spec, const std::string& provider = "") { @@ -98,12 +111,14 @@ inline std::unique_ptr<HashFunction> make_hash_function(const std::string& algo_ throw Algorithm_Not_Found(algo_spec); } +BOTAN_DEPRECATED("Use HashFunction::create") inline HashFunction* get_hash(const std::string& algo_spec, const std::string& provider = "") { - return get_hash_function(algo_spec, provider); + return HashFunction::create(algo_spec, provider).release(); } +BOTAN_DEPRECATED("Use HashFunction::providers") inline std::vector<std::string> get_hash_function_providers(const std::string& algo_spec) { return HashFunction::providers(algo_spec); @@ -115,12 +130,14 @@ inline std::vector<std::string> get_hash_function_providers(const std::string& a * @param algo_spec the name of the desired MAC * @return pointer to the MAC object */ +BOTAN_DEPRECATED("MessageAuthenticationCode::create") inline MessageAuthenticationCode* get_mac(const std::string& algo_spec, const std::string& provider = "") { return MessageAuthenticationCode::create(algo_spec, provider).release(); } +BOTAN_DEPRECATED("MessageAuthenticationCode::create") inline std::unique_ptr<MessageAuthenticationCode> make_message_auth(const std::string& algo_spec, const std::string& provider = "") { @@ -130,6 +147,7 @@ inline std::unique_ptr<MessageAuthenticationCode> make_message_auth(const std::s throw Algorithm_Not_Found(algo_spec); } +BOTAN_DEPRECATED("MessageAuthenticationCode::providers") inline std::vector<std::string> get_mac_providers(const std::string& algo_spec) { return MessageAuthenticationCode::providers(algo_spec); |