qcrypto_pubkey_to_file()

Save a public key to a file

Synopsis:

#include <qcrypto/qcrypto_keys.h>
int qcrypto_pubkey_to_file(qcrypto_ctx_t *ctx,
                           qcrypto_key_t *key,
                           const char *filename,
                           qcrypto_key_format_t fmt)

Arguments:

ctx
The algorithm context object.
key
The public key handle.
filename
The key filename.
fmt
The key encoding format (see qcrypto_key_format_t).

Library:

libqcrypto

Description:

This function saves a public key to the specified filename.

Returns:

QCRYPTO_R_EOK if successful or qcrypto_errno if an error occurred.