User Manual

43
0 if successful; otherwise, Nonzero. Reference Table 1.11
Example
int st;
unsigned char revlen;
unsigned char fileset[20];
st= fw_getFileProper (icdev,&revlen,fileset);
int fw_changeFileSetting(int icdev,unsigned char fileNo,unsigned char
comSet,unsigned char* accessRight,char* sessionKey);
Description
Change the file settings
Parameters
icdev: Value of Device Handle.
fileNo: File ID
comSet: data transmission form:
0: transmission in the clear,
1: MAC code validation,
3: DES/3DES Encryption
accessRight: Access right
accessRight [0]:Low nibble has the right to modify access permissions
High nibble has the right to read / write the file
accessRight [1]:Low nibble has the access to write to the file
High nibble has the access to read the file
sessionKey: session key
Return Value
0 if successful; otherwise, Nonzero. Reference Table 1.11
Example
/ / Modify the setting of file with identification number of 0x01
int st;
unsigned char comSetting=0x01;// MAC code verification
unsigned char accessRights[3]={0x22,0x22};/* to Read, write, read / write, to modify
the settings, all are required to verify the key No. 2 */
st= fw_changeFileSetting (icdev,0x01,comSetting,accessRights,sesskey);
/* sesskey key obtained by verifying the session key */
int fw_createDataFile_desfire(int icdev,unsigned char fileNo,unsigned char
ComSet,unsigned char* AccessRight,unsigned char* FileSize);
Description
Create a standard data file
Parameters
icdev: Value of Device Handle.
fileNo: File ID
comSet: data transmission form:
0: transmission in the clear,
1: MAC code validation,
3: DES/3DES Encryption