|
Botan
1.11.15
|
#include <algo_registry.h>
Classes | |
| class | Add |
| struct | Algo_Info |
Public Types | |
| typedef std::function< T *(const Spec &)> | maker_fn |
| typedef T::Spec | Spec |
Public Member Functions | |
| void | add (const std::string &name, const std::string &provider, maker_fn fn, byte pref) |
| T * | make (const Spec &spec, const std::string &provider="") |
| std::vector< std::string > | providers_of (const Spec &spec) |
Static Public Member Functions | |
| static Algo_Registry< T > & | global_registry () |
Definition at line 22 of file algo_registry.h.
| typedef std::function<T* (const Spec&)> Botan::Algo_Registry< T >::maker_fn |
Definition at line 27 of file algo_registry.h.
| typedef T::Spec Botan::Algo_Registry< T >::Spec |
Definition at line 25 of file algo_registry.h.
| void Botan::Algo_Registry< T >::add | ( | const std::string & | name, |
| const std::string & | provider, | ||
| maker_fn | fn, | ||
| byte | pref | ||
| ) | [inline] |
Definition at line 35 of file algo_registry.h.
{
std::unique_lock<std::mutex> lock(m_mutex);
m_algo_info[name].add_provider(provider, fn, pref);
}
| static Algo_Registry<T>& Botan::Algo_Registry< T >::global_registry | ( | ) | [inline, static] |
Definition at line 29 of file algo_registry.h.
Referenced by Botan::Algo_Registry< T >::Add::Add(), Botan::generate_rfc6979_nonce(), Botan::get_transform(), Botan::make_a(), and Botan::providers_of().
{
static Algo_Registry<T> g_registry;
return g_registry;
}
| T* Botan::Algo_Registry< T >::make | ( | const Spec & | spec, |
| const std::string & | provider = "" |
||
| ) | [inline] |
Definition at line 50 of file algo_registry.h.
References e.
Referenced by Botan::CBC_MAC::make(), Botan::HMAC::make(), Botan::CTR_BE::make(), Botan::OFB::make(), and Botan::CMAC::make().
| std::vector<std::string> Botan::Algo_Registry< T >::providers_of | ( | const Spec & | spec | ) | [inline] |
Definition at line 41 of file algo_registry.h.
{
std::unique_lock<std::mutex> lock(m_mutex);
auto i = m_algo_info.find(spec.algo_name());
if(i != m_algo_info.end())
return i->second.providers();
return std::vector<std::string>();
}
1.7.6.1