sc_crypto_token_serialize()

Serialize a crypto token instance.

Synopsis:

#include <smartcard/sc_crypto_token.h>
 
sc_response_code_t sc_crypto_token_serialize(const sc_crypto_token_t *crypto_token,                 
                                             unsigned char *buffer,                 
                                             size_t *buffer_length)

Since:

BlackBerry 10.2.0

Arguments:

crypto_token

The crypto token instance. This value cannot be NULL.

buffer

The buffer where the serialized form of the instance is written. If this parameter is NULL, then this function computes only the size of the buffer that is required to hold the serialized form of the instance.

buffer_length

If buffer is not NULL, then this parameter indicates the length of buffer. Otherwise, the size of the buffer that is required to hold the serialized data is written to this parameter when the function returns. This value cannot 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.