Botan

Algorithm Factory

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

Algorithm Factory


void  addEngine(Engine engine);

Parameters
Engine engine the engine to add to AlgorithmFactory and gives ownership of it.

void  clearCaches();

Clear out any cached objects


Vector!string  providersOf(in string algo_spec);

Possible providers of a request assuming you don't have different types by the same name

Parameters
string algo_spec the algorithm we are querying
Returns
list of providers of this algorithm

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

Set the preferred provider for an algorithm

Parameters
string algo_spec the algorithm we are setting a provider for
string provider the provider we would like to use

const(BlockCipher)  prototypeBlockCipher(in string algo_spec, in string provider = "");

Prototypical block cipher retrieval by name, it must be cloned to be used

Parameters
string algo_spec the algorithm we want
string provider the provider we would like to use
Returns
pointer to const prototype object, ready to clone(), or NULL

BlockCipher  makeBlockCipher(in string algo_spec, in string provider = "");

Makes a ready-to-use block cipher according to its name

Parameters
string algo_spec the algorithm we want
string provider the provider we would like to use
Returns
pointer to freshly created instance of the request algorithm

void  addBlockCipher(BlockCipher block_cipher, in string provider = "");

Add a new block cipher

Parameters
BlockCipher block_cipher the algorithm to add
string provider the provider of this algorithm

const(StreamCipher)  prototypeStreamCipher(in string algo_spec, in string provider = "");

Return the prototypical stream cipher corresponding to this request

Parameters
string algo_spec the algorithm we want
string provider the provider we would like to use
Returns
Pointer to const prototype object, ready to clone(), or NULL

StreamCipher  makeStreamCipher(in string algo_spec, in string provider = "");

Return a new stream cipher corresponding to this request

Parameters
string algo_spec the algorithm we want
string provider the provider we would like to use
Returns
Pointer to freshly created instance of the request algorithm

void  addStreamCipher(StreamCipher stream_cipher, in string provider = "");

Add a new stream cipher

Parameters
StreamCipher stream_cipher the algorithm to add
string provider the provider of this algorithm

const(HashFunction)  prototypeHashFunction(in string algo_spec, in string provider = "");

Return the prototypical object corresponding to this request (if found)

Parameters
string algo_spec the algorithm we want
string provider the provider we would like to use
Returns
pointer to const prototype object, ready to clone(), or NULL

HashFunction  makeHashFunction(in string algo_spec, in string provider = "");

Return a new object corresponding to this request

Parameters
string algo_spec the algorithm we want
string provider the provider we would like to use
Returns
pointer to freshly created instance of the request algorithm

void  addHashFunction(HashFunction hash, in string provider = "");

Add a new hash

Parameters
HashFunction hash the algorithm to add
string provider the provider of this algorithm

const(MessageAuthenticationCode)  prototypeMac(in string algo_spec, in string provider = "");

Return the prototypical object corresponding to this request

Parameters
string algo_spec the algorithm we want
string provider the provider we would like to use
Returns
pointer to const prototype object, ready to clone(), or NULL

MessageAuthenticationCode  makeMac(in string algo_spec, in string provider = "");

Return a new object corresponding to this request

Parameters
string algo_spec the algorithm we want
string provider the provider we would like to use
Returns
pointer to freshly created instance of the request algorithm

void  addMac(MessageAuthenticationCode mac, in string provider = "");

Parameters
MessageAuthenticationCode mac the algorithm to add
string provider the provider of this algorithm

const(PBKDF)  prototypePbkdf(in string algo_spec, in string provider = "");

Return the prototypical object corresponding to this request

Parameters
string algo_spec the algorithm we want
string provider the provider we would like to use
Returns
pointer to const prototype object, ready to clone(), or NULL

PBKDF  makePbkdf(in string algo_spec, in string provider = "");

Returns a new Pbkdf object corresponding to this request

Parameters
string algo_spec the algorithm we want
string provider the provider we would like to use
Returns
pointer to freshly created instance of the request algorithm

void  addPbkdf(PBKDF pbkdf, in string provider = "");

Add a new Pbkdf

Parameters
PBKDF pbkdf the algorithm to add
string provider the provider of this algorithm

@property ref Vector!Engine  engines();

List of  engines available