User Manual

48
st= fw_debit_desfire (icdev,0x02,value,sesskey);/ *sesskey means the session key
obtained by verifying key */
Remark
After this function called successfully, you should also call the function
fw_commitTransfer_desfire to make the operation into effect.
int fw_writeRecord_desfire(int icdev,unsigned char fileNo,unsigned int
offset,unsigned int length,unsigned char* data,char* sessionKey);
Description
Wite one record to record file
Parameters
icdev: Value of Device Handle.
fileNo: File ID
offset: offset address
length: the length of written data
data : data to be written
sessionKey: session key
Return Value
0 if successful; otherwise, Nonzero. Reference Table 1.11
Example
int st;
unsigned char data[8]={0x11,0x22,0x33,0x44,0x55,0x66,0x77,0x88};
st= fw_writeRecord_desfire (icdev,0x03,0,8,data,sesskey); / *sesskey means the
session key obtained by verifying key */
Remark
After this function called successfully, you must also call the function
fw_commitTransfer_desfire to make the operation into effect
int fw_readRecord_desfire(int icdev,unsigned char fileNo,unsigned int
offset,unsigned int length,unsigned char* revData,unsigned int*
SgRecordlen,unsigned int* rlen,char* sessionKey);
Description
Read record file
Parameters
icdev: Value of Device Handle.
fileNo: File ID
offset: offset address, the beginning record number
length: the number of records to read from the offset address
revData: data read out
SgRecordlen: the length of individual record
Rlen: the total length of data read out
sessionKey: session key
Return Value
0 if successful; otherwise, Nonzero. Reference Table 1.11