sc_generate_key()

Generate a cryptographic key on the card.

Synopsis:

#include <smartcard/sc_smart_card.h>
 
sc_response_code_t sc_generate_key(sc_context_t *context,                 
                                   const sc_crypto_system_t *crypto_system,                 
                                   sc_key_store_data_t *key_store_data)

Since:

BlackBerry 10.3.1

Arguments:

context

The active smart card context. Must not be NULL.

crypto_system

The cryptographic system instance that specifies the key parameters. Must not be NULL.

key_store_data

The instance of the key store data that identifies the key on the card. On input, if an existing key store data element is provided, the existing key referenced by this key store data instance is replaced with a newly generated key. If a newly created (empty) key store data instance is provided, a new key is generated. On output, the instance of the key store data that identifies the newly generated key. Must not be NULL.

Library:

libscs (For the qcc command, use the -l scs option to link against this library)

Description:

Returns:

SC_SCARD_S_SUCCESS upon success, an error code otherwise. See sc_response_code_t for defined error codes.

Last modified: 2014-09-30



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus