User Manual

63
Example
int st;
unsigned char rbuf[4]={0};
st=fw_getProtectData_4428(icdev,0, rbuf,4);
int fw_setProtectData_4428(int icdev,unsigned int _Adr,unsigned char *_Data,int
length);
Description
write protected bits
Parameters
icdev: Value of Device Handle.
_Adr: The starting address of written data
_Data: data to be written
length: the length of written data
Return Value
0 if successful; otherwise, Nonzero.
Example
int st;
unsigned char rbuf[2]={0xa2,0x1e};
st=fw_setProtectData_4428(icdev,0, rbuf,2);
Remark
1: parameter _Adr should value between 0 and 1023;
2: written data should be consistent with the corresponding data which stored
in card;
3: parameter length should not exceed 1024;
int fw_authentikey_4428(int icdev, unsigned char *key);
Description
Authenticate key of 4428 card
Parameters
icdev: Value of Device Handle.
Key : key to be verified(2 bytes)
Return Value
0 if successful; otherwise, Nonzero.
Example
unsigned char keybuffer[2]={0xff,0xff};
if(fw_authentikey_4428(icdev,keybuffer)!=0)
{
printf(“Authentication error”);
}
Remark:
Card will be locked if this function fails for 8 times continuously.
int fw_changkey_4428(int icdev, unsigned char *key);
Description
Change key