60
icdev:Value of Device Handle.
_Adr:
Starting address for Reading(must set 0)
_Data:
returned Protect bits.
length:
Length of data to read(must set 4)
Return Value
0 if successful; otherwise, Nonzero.
Example
int st;
unsigned char rbuf[4]={0};
st=fw_getProtectData_4442(icdev,0, rbuf,4);
Remark
4442 card has 32 bytes of protection data, the address is x00-0x20, 4-byte read
out correspond to each of a corresponding bit, 0 for write protection, 1 for not
write-protection;
int fw_setProtectData_4442(int icdev,unsigned char _Adr,unsigned char *_Data,int
length);
Description
Write protected bits.
Parameters
i
cdev:Value of Device Handle.
_Adr: Starting address for writing(0~32).
_Data:Data for writing.
length:
Length of data to write(0~32).
Return Value
0 if successful; otherwise, Nonzero.
Example
int st;
unsigned char rbuf[2]={0xa2,0x1e};
st=fw_setProtectData_4442(icdev,0, rbuf,2);
Remark
1: parameter _Adr should be set to 0~32;
2: Data for writing must be Consistent with the data stored in the card;
3: value of parameter “length” should not exceed 32;
int fw_authentikey_4442(int icdev,unsigned char _Adr,int rlen,unsigned char
*key);
Description
Verify keys.
Parameters
icdev: Value of Device Handle.
_Adr:
Starting address for data of verify(must set 0).
rlen:
Length of data to verify(must set 3).
key:
Key to verify(3 bytes).
Return Value
0 if successful; otherwise, Nonzero.