Providers

QCA works on the concept of a "provider".

There is a limited internal provider (named "default"), but most of the work is done in plugin modules.

The logic to selection of a provider is fairly simple. The user can specify a provider name - if that name exists, and the provider supports the requested feature, then the named provider is used. If that didn't work, then the available plugins are searched (based on a priority order) for the requested feature. If that doesn't work, then the default provider is searched for the requested feature.

So the only way to get the default provider is to either have no other support whatsoever, or to specify the default provider directly (this goes for the algorithm constructors as well as setGlobalRNG()).

You can add your own provider in two ways - as a shared object plugin, and as a part of the client code.

The shared object plugin needs to be able to be found using the built-in scan logic - this normally means you need to install it into the plugins/crypto subdirectory within the directory that Qt is installed to. This will make it available for all applications.

If you have a limited application domain (such as a specialist algorithm, or a need to be bug-compatible), you may find it easier to create a client-side provider, and add it using the QCA::insertProvider call. There is an example of this - see the AES-CMAC example.