qcrypto_digest_final()

Updated: April 19, 2023

Finalize a digest

Synopsis:

#include <qcrypto/qcrypto.h>
int qcrypto_digest_final(qcrypto_ctx_t *ctx,
                         uint8_t *digest,
                         size_t *size)

Arguments:

ctx
The algorithm context object.
digest
The digest buffer to copy the digest value to. Make sure the buffer is large enough for the digest.
size
A pointer to a variable to store the size of the digest in. Specify NULL if this value is not required.

Library:

libqcrypto

Description:

This function retrieves a digest value. It writes the same number of bytes as qcrypto_digestsize().

Returns:

QCRYPTO_R_EOK if successful or qcrypto_errno if an error occurred.