qcrypto_keypair_generate()

Updated: April 19, 2023

Generate a PKI key

Synopsis:

#include <qcrypto/qcrypto_keys.h>
int qcrypto_keypair_generate(qcrypto_ctx_t *ctx,
                             qcrypto_key_t **pubkey,
                             qcrypto_key_t **privkey)

Arguments:

ctx
The algorithm context object.
pubkey
The public key handle (optional).
privkey
The private key handle.

Library:

libqcrypto

Description:

The public key can be omitted and retrieved using qcrypto_pubkey_from_privkey() later.

Returns:

QCRYPTO_R_EOK if successful or qcrypto_errno if an error occurred.