qcrypto_privkey_from_mem()

Updated: April 19, 2023

Load a private key from memory

Synopsis:

#include <qcrypto/qcrypto_keys.h>
int qcrypto_privkey_from_mem(qcrypto_ctx_t *ctx,
                             qcrypto_key_t **key,
                             const uint8_t *kbuf,
                             size_t ksize,
                             qcrypto_key_format_t fmt)

Arguments:

ctx
The algorithm context object.
key
A pointer to the private key handle.
kbuf
The key buffer.
ksize
The key buffer size.
fmt
The key encoding format (see qcrypto_key_format_t).

Library:

libqcrypto

Description:

This function loads a private key from the specified memory buffer.

Returns:

QCRYPTO_R_EOK if successful or qcrypto_errno if an error occurred.