User Manual

42
Description
Change the master key
Parameters
icdev: Value of Device Handle.
sessionKey: session key
curkey: the current key
keyNo: key number
newkey: new key
Return Value
0 if successful; otherwise, Nonzero. Reference Table 1.11
Example
int st;
unsigned char
currentkey[17]={0x11,0x22,0x33,0x44,0x55,0x66,0x77,0x88,0x11,0x22,0x33,0x44,0x5
5,0x66,0x77,0x88};
unsigned char
newkey[17]={0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
0x22,0x22,0x22,0x22,0x22};
st= fw_changeKey_desfire(icdev,sessionkey,currentkey,1,newkey);
int fw_getFileIDs_desfire(int icdev,unsigned char* rlen,unsigned char* fileIDs);
Description
Get all file identification numbers of current application
Parameters
icdev: Value of Device Handle.
Rlen: the length of returned data
fileIDs: file identification number (each byte means a file identification
number)
Return Value
0 if successful; otherwise, Nonzero. Reference Table 1.11
Example
int st;
unsigned char revlen;
unsigned char fileids[20];
st= fw_getFileIDs_desfire (icdev,&revlen,fileids);
int fw_getFileProper(int icdev,unsigned char fileNo,unsigned char* rlen,unsigned
char * fileProper);
Description
Get File Settings
Parameters
icdev: Value of Device Handle.
fileNo: File ID
rlen: length of returned data
fileProper: file property settings
Return Value