diff options
Diffstat (limited to 'src/algo_factory')
-rw-r--r-- | src/algo_factory/algo_cache.h | 6 | ||||
-rw-r--r-- | src/algo_factory/algo_factory.cpp | 4 | ||||
-rw-r--r-- | src/algo_factory/algo_factory.h | 12 | ||||
-rw-r--r-- | src/algo_factory/prov_weight.cpp | 2 |
4 files changed, 12 insertions, 12 deletions
diff --git a/src/algo_factory/algo_cache.h b/src/algo_factory/algo_cache.h index 4606cac23..0d891ad3f 100644 --- a/src/algo_factory/algo_cache.h +++ b/src/algo_factory/algo_cache.h @@ -20,7 +20,7 @@ namespace Botan { * @param prov_name a provider name * @return weight for this provider */ -u32bit static_provider_weight(const std::string& prov_name); +size_t static_provider_weight(const std::string& prov_name); /** * Algorithm_Cache (used by Algorithm_Factory) @@ -134,14 +134,14 @@ const T* Algorithm_Cache<T>::get(const std::string& algo_spec, const T* prototype = 0; std::string prototype_provider; - u32bit prototype_prov_weight = 0; + size_t prototype_prov_weight = 0; const std::string pref_provider = search_map(pref_providers, algo_spec); for(provider_iterator i = algo->second.begin(); i != algo->second.end(); ++i) { const std::string prov_name = i->first; - const u32bit prov_weight = static_provider_weight(prov_name); + const size_t prov_weight = static_provider_weight(prov_name); // preferred prov exists, return immediately if(prov_name == pref_provider) diff --git a/src/algo_factory/algo_factory.cpp b/src/algo_factory/algo_factory.cpp index 6bd66d349..ba4a435d7 100644 --- a/src/algo_factory/algo_factory.cpp +++ b/src/algo_factory/algo_factory.cpp @@ -70,7 +70,7 @@ const T* factory_prototype(const std::string& algo_spec, if(scan_name.cipher_mode() != "") return 0; - for(u32bit i = 0; i != engines.size(); ++i) + for(size_t i = 0; i != engines.size(); ++i) { if(provider == "" || engines[i]->provider_name() == provider) { @@ -141,7 +141,7 @@ void Algorithm_Factory::set_preferred_provider(const std::string& algo_spec, /* * Get an engine out of the list */ -Engine* Algorithm_Factory::get_engine_n(u32bit n) const +Engine* Algorithm_Factory::get_engine_n(size_t n) const { if(n >= engines.size()) return 0; diff --git a/src/algo_factory/algo_factory.h b/src/algo_factory/algo_factory.h index 33a778b01..1c865b470 100644 --- a/src/algo_factory/algo_factory.h +++ b/src/algo_factory/algo_factory.h @@ -70,7 +70,7 @@ class BOTAN_DLL Algorithm_Factory /** * @param algo_spec the algorithm we want * @param provider the provider we would like to use - * @returns pointer to const prototype object, readiny for clone(), or NULL + * @returns pointer to const prototype object, ready to clone(), or NULL */ const BlockCipher* prototype_block_cipher(const std::string& algo_spec, @@ -93,7 +93,7 @@ class BOTAN_DLL Algorithm_Factory /** * @param algo_spec the algorithm we want * @param provider the provider we would like to use - * @returns pointer to const prototype object, readiny for clone(), or NULL + * @returns pointer to const prototype object, ready to clone(), or NULL */ const StreamCipher* prototype_stream_cipher(const std::string& algo_spec, @@ -116,7 +116,7 @@ class BOTAN_DLL Algorithm_Factory /** * @param algo_spec the algorithm we want * @param provider the provider we would like to use - * @returns pointer to const prototype object, readiny for clone(), or NULL + * @returns pointer to const prototype object, ready to clone(), or NULL */ const HashFunction* prototype_hash_function(const std::string& algo_spec, @@ -139,7 +139,7 @@ class BOTAN_DLL Algorithm_Factory /** * @param algo_spec the algorithm we want * @param provider the provider we would like to use - * @returns pointer to const prototype object, readiny for clone(), or NULL + * @returns pointer to const prototype object, ready to clone(), or NULL */ const MessageAuthenticationCode* prototype_mac(const std::string& algo_spec, @@ -178,7 +178,7 @@ class BOTAN_DLL Algorithm_Factory Engine_Iterator(const Algorithm_Factory& a) : af(a) { n = 0; } private: const Algorithm_Factory& af; - u32bit n; + size_t n; }; friend class Engine_Iterator; @@ -187,7 +187,7 @@ class BOTAN_DLL Algorithm_Factory Algorithm_Factory& operator=(const Algorithm_Factory&) { return (*this); } - Engine* get_engine_n(u32bit) const; + Engine* get_engine_n(size_t n) const; std::vector<Engine*> engines; diff --git a/src/algo_factory/prov_weight.cpp b/src/algo_factory/prov_weight.cpp index f9c9a9634..fca791333 100644 --- a/src/algo_factory/prov_weight.cpp +++ b/src/algo_factory/prov_weight.cpp @@ -12,7 +12,7 @@ namespace Botan { /** * Return a static provider weighing */ -u32bit static_provider_weight(const std::string& prov_name) +size_t static_provider_weight(const std::string& prov_name) { /* * Prefer asm over C++, but prefer anything over OpenSSL or GNU MP; to use |