qcrypto_init()

Updated: April 19, 2023

Initialize a library

Synopsis:

#include <qcrypto/qcrypto.h>
int qcrypto_init(unsigned flags,
                 const char *name)

Arguments:

flags
Initialization flag value (QCRYPTO_INIT_*).
name
The plugin name (optional).

Library:

libqcrypto

Description:

The qcrypto_init() function adds the plugin with a tag value that matches __progname. When a user requests an algorithm, this entry is searched for a matching tag first, before the contents of the qcrypto library configuration file.

If a process calls qcrypto_init() multiple times, to successfully unload all plugins it must call qcrypto_uninit() the same number of times.

Returns:

QCRYPTO_R_EOK if successful or qcrypto_errno if an error occurred.