qcrypto_signature_sign()

Updated: October 26, 2022

Sign a signature

Synopsis:

#include <qcrypto/qcrypto.h>
int qcrypto_signature_sign(qcrypto_ctx_t *ctx,
                           uint8_t *sig,
                           size_t *sigsize)

Arguments:

ctx
The algorithm context object.
sig
The signature buffer.
sigsize
The combined size of the signature buffer and the retrieved signature.

Library:

libqcrypto

Description:

This function signs the input data digest using the specified algorithm, its arguments, and a private key. Use qcrypto_signature_sigsize() to get the signature size and make sure that the caller can allocate a buffer that is large enough.

Returns:

QCRYPTO_R_EOK if successful or qcrypto_errno if an error occurred.