8 #ifndef BOTAN_ALGORITHM_FACTORY_H__
9 #define BOTAN_ALGORITHM_FACTORY_H__
11 #include <botan/types.h>
23 class MessageAuthenticationCode;
26 template<
typename T>
class Algorithm_Cache;
51 void add_engine(
Engine* engine);
62 std::vector<std::string> providers_of(
const std::string& algo_spec);
68 void set_preferred_provider(
const std::string& algo_spec,
69 const std::string& provider);
77 prototype_block_cipher(
const std::string& algo_spec,
78 const std::string& provider =
"");
85 BlockCipher* make_block_cipher(
const std::string& algo_spec,
86 const std::string& provider =
"");
92 void add_block_cipher(
BlockCipher* algo,
const std::string& provider);
100 prototype_stream_cipher(
const std::string& algo_spec,
101 const std::string& provider =
"");
108 StreamCipher* make_stream_cipher(
const std::string& algo_spec,
109 const std::string& provider =
"");
115 void add_stream_cipher(
StreamCipher* algo,
const std::string& provider);
123 prototype_hash_function(
const std::string& algo_spec,
124 const std::string& provider =
"");
131 HashFunction* make_hash_function(
const std::string& algo_spec,
132 const std::string& provider =
"");
138 void add_hash_function(
HashFunction* algo,
const std::string& provider);
146 prototype_mac(
const std::string& algo_spec,
147 const std::string& provider =
"");
155 const std::string& provider =
"");
162 const std::string& provider);
169 const PBKDF* prototype_pbkdf(
const std::string& algo_spec,
170 const std::string& provider =
"");
177 PBKDF* make_pbkdf(
const std::string& algo_spec,
178 const std::string& provider =
"");
184 void add_pbkdf(
PBKDF* algo,
const std::string& provider);
214 Engine* get_engine_n(
size_t n)
const;
216 std::vector<Engine*> engines;
218 Algorithm_Cache<BlockCipher>* block_cipher_cache;
219 Algorithm_Cache<StreamCipher>* stream_cipher_cache;
220 Algorithm_Cache<HashFunction>* hash_cache;
221 Algorithm_Cache<MessageAuthenticationCode>* mac_cache;
222 Algorithm_Cache<PBKDF>* pbkdf_cache;
Engine_Iterator(const Algorithm_Factory &a)