39
int st;
unsigned char aid[4]={0x01,0x00,0x00};
st= fw_selectApp_desfire(icdev,aid);
int
fw_getKeySetting_desfire(int
icdev,unsigned
char*
rlen,unsigned
char*
setbuf);
Description
Get
the
master
key
settings
Parameters
icdev: Value of Device Handle.
Rlen: the length of returned data
Setbuf: set the master of key (card) application
Return Value
0 if successful; otherwise, Nonzero. Reference Table 1.11
Example
int st;
unsigned char revlen;
unsigned char set[4];
st= fw_getKeySetting_desfire (icdev,&revlen,set);
int fw_getKeyver_desfire(int icdev,unsigned char keyNo,unsigned char* keyVer);
Description
Get the version of master key
Parameters
icdev: Value of Device Handle.
keyNo: key numbers
keyVer: Key version
Return Value
0 if successful; otherwise, Nonzero. Reference Table 1.11
Example
int st;
unsigned char keyVersion[3];
st= fw_getKeyver_desfire(icdev,1, keyVersion);
int
fw_createApp_desfire(int
icdev,unsigned
char*AID,unsigned
char
KeySetting,unsigned char NumOfKey);
Description
Creat application
Parameters
icdev: Value of Device Handle.
AID:
key numbers
KeySetting: set application master key
The meaning of 8-bit Application master key can be decribed as below:
Bit7
Bit6
Bit5
Bit4
Bit3
Bit2
Bit1
Bit0
changeKey
Access Rights
changeKey
Access
changeKey
Access
changeKey
Access
Configuration
changeable
Free
create/delete
Free
director
Allow
change