Botan

Algorithm Lookup

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

const(BlockCipher)  retrieveBlockCipher(in string algo_spec);

Retrieve an object prototype from the global factory

Parameters
string algo_spec an algorithm name
Returns
constant prototype object (use clone to create usable object), library retains ownership

const(StreamCipher)  retrieveStreamCipher(in string algo_spec);

Retrieve an object prototype from the global factory

Parameters
string algo_spec an algorithm name
Returns
constant prototype object (use clone to create usable object), library retains ownership

const(HashFunction)  retrieveHash(in string algo_spec);

Retrieve an object prototype from the global factory

Parameters
string algo_spec an algorithm name
Returns
constant prototype object (use clone to create usable object), library retains ownership

const(MessageAuthenticationCode)  retrieveMac(in string algo_spec);

Retrieve an object prototype from the global factory

Parameters
string algo_spec an algorithm name
Returns
constant prototype object (use clone to create usable object), library retains ownership

PBKDF  getPbkdf(in string algo_spec);

Password based key derivation function factory method

Parameters
string algo_spec the name of the desired PBKDF algorithm
Returns
pointer to newly allocated object of that type

KeyedFilter  getCipher(in string algo_spec, in SymmetricKey key, in InitializationVector iv, CipherDir direction);

Get a cipher object. Factory method for general symmetric cipher filters.

Parameters
string algo_spec the name of the desired cipher
SymmetricKey key the key to be used for encryption/decryption performed by the filter
InitializationVector iv the initialization vector to be used
CipherDir direction determines whether the filter will be an encrypting or decrypting filter
Returns
pointer to newly allocated encryption or decryption filter

KeyedFilter  getCipher(in string algo_spec, in SymmetricKey key, CipherDir direction);

Factory method for general symmetric cipher filters.

Parameters
string algo_spec the name of the desired cipher
SymmetricKey key the key to be used for encryption/decryption performed by the filter
CipherDir direction determines whether the filter will be an encrypting or decrypting filter
Returns
pointer to the encryption or decryption filter

KeyedFilter  getCipher(in string algo_spec, CipherDir direction);

Factory method for general symmetric cipher filters. No key will be set in the filter.

Parameters
string algo_spec the name of the desired cipher
CipherDir direction determines whether the filter will be an encrypting or decrypting filter
Returns
pointer to the encryption or decryption filter

bool  haveAlgorithm(in string name);

Check if an algorithm exists.

Parameters
string name the name of the algorithm to check for
Returns
true if the algorithm exists, false otherwise