qcrypto_key_generate()

Updated: April 19, 2023

Generate a symmetric key

Synopsis:

#include <qcrypto/qcrypto_keys.h>
int qcrypto_key_generate(qcrypto_ctx_t *ctx,
                         qcrypto_key_t **key,
                         size_t keysize)

Arguments:

ctx
The algorithm context object.
key
A pointer to the key handle.
keysize
The key size.

Library:

libqcrypto

Description:

This function generates a symmetric key of size keysize.

Returns:

QCRYPTO_R_EOK if successful or qcrypto_errno if an error occurred.