lpcware

How to change the Key for Sector authorisation?

Discussion created by lpcware Employee on Jun 15, 2016
Content originally posted in LPCWare by Microembedded on Sun Jun 01 01:16:31 MST 2014
In the RC663-LPC1227-Classic program authentication is done using the below function

PH_CHECK_SUCCESS_FCT(status, phpalMifare_MfcAuthenticate(&palMifare,
                                0, PHHAL_HW_MFC_KEYA, Key, bUid));
The default key given is :

static /* const */ uint8_t Key[6] = {0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU, 0xFFU};

Now i tried to write new key number for authorisation by below given function: PH_CHECK_SUCCESS_FCT(status, phKeyStore_SetKey(&Rc663keyStore, 0, 0,
                PH_KEYSTORE_KEY_TYPE_MIFARE, Key, 0));

It didnt work.Kindly suggest ways to load a new key for sector authorisation.Thanks in advance.

Outcomes