Botan

An algorithm cache (used by AlgorithmFactory)

License
Botan is released under the Simplified BSD License (see LICENSE.md)

ubyte  staticProviderWeight(in string prov_name);

Parameters
string prov_name a provider name
Returns
weight for this provider

class  AlgorithmCache(T);

 AlgorithmCache (used by AlgorithmFactory)


const const(T)  get(string algo_spec, string requested_provider);

Look for an algorithm implementation by a particular provider

Parameters
string algo_spec names the requested algorithm
string requested_provider suggests a preferred provider
Returns
prototype object, or NULL

void  add(T algo, in string requested_name, in string provider);

Add a new algorithm implementation to the cache

Parameters
T algo the algorithm prototype object
string requested_name how this name will be requested
string provider the name of the provider of this prototype

void  setPreferredProvider(in string algo_spec, in string provider);

Set the preferred provider for an algorithm

Parameters
string algo_spec names the algorithm
string provider names the preferred provider

Vector!string  providersOf(in string algo_name);

Find the providers of this algo (if any)

Parameters
string algo_name names the algorithm
Returns
list of providers of this algorithm

void  clearCache();

Clear the cache