qcrypto_keygen_op_key_gen

Generate a symmetric key

Synopsis:

#include <qcrypto/qcrypto_plugin.h>
typedef int(* qcrypto_keygen_op_key_gen)(qcrypto_state_ctx_t *sctx,
            qcrypto_key_ctx_t *kctx,
            size_t keysize);

Arguments:

sctx
The algorithm state context object.
kctx
The key context object.
keysize
The key size in bytes.

Library:

libqcrypto

Description:

Plugins implement this function to generate symmetric keys. It should be set for symmetric key algorithms only.

Returns:

QCRYPTO_R_EOK if successful or qcrypto_errno if an error occurred.