sc_change_code()

Change the smart card PIN on a card.

Synopsis:

#include <smartcard/sc_smart_card.h>
 
sc_response_code_t sc_change_code(sc_context_t *context,                 
                                  const unsigned char *old_code,                 
                                  size_t old_code_length,                 
                                  const unsigned char *new_code,                 
                                  size_t new_code_length,                 
                                  sc_ihv_mode_t ihv_mode,                 
                                  unsigned int ref)

Since:

BlackBerry 10.2.0

Arguments:

context

The active smart card context. This value cannot be NULL.

old_code

The old smart card code. Set this parameter to NULL to initialize a card with a PIN.

old_code_length

The length of the old smart card code.

new_code

The new smart card code.

new_code_length

The length of the new smart card code.

ihv_mode

Indicates whether cardholder verification (CHV) is to be made against a local (SC_FL_IHV_LOCAL) or global (SC_FL_IHV_GLOBAL) code. If the SC_FL_IHV_CHECKONLY flag is specified, then no UI should be presented to obtain CHV from the device user.

ref

A vendor-specific reference value.

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.