25
Example
//key A and key B
unsigned char password[7]={0xa0,0xa1,0xa2,0xa3,0xa4,0xa5};
/*Load section 1 key with 0 model */
if((fw_load_key(icdev,0,1,password))!=0)
{
printf("Load key error!");
fw_exit(icdev);
}
int fw_authentication(int icdev,unsigned char _Mode,unsigned char _SecNr)
Description
Verify Key.
Parameters
icdev:Value of Device Handle.
_Mode:The mode of
loading key
.
Value are as follows:
For each sector of M1 card,
there are
three sets of corresponding password
(KEYSET0, KEYSET1, KEYSET2) in the reader, each password include A password (KEYA)
and B password (KEYB), a total of six passwords, use 0~2,4 ~ 6 to represent the six
Password:
0 - KEYSET0 of KEYA `
1 - KEYSET1 of KEYA
2 - KEYSET2 of KEYA
4 - KEYSET0 of
KEYB
5 - KEYSET1 of
KEYB
6 - KEYSET2 of
KEYB
_SecNr:The section number to verify.
Return Value
0 if successful; otherwise, Nonzero.
Example
//Verify section 4 key with 0 model
if((fw_authentication(icdev,0,4))!=0)
{
printf("Authentication error!");
}
int
fw_authentication_pass(int
icdev,
unsigned
char
_Mode,
unsigned
char
Addr,unsigned char *passbuff);
Description
Verify Key function, when use this function, you can not implement function
fw_load_key.
Parameters
icdev:Value of Device Handle.
_Mode:The mode of
loading key
.
Value are as follows:
For each sector of M1 card,
there are
three sets of corresponding password
Содержание E7
Страница 3: ...3 4 Appendix 68 4 1 Table 1 Mifare Plus card personalized structure 68 ...
Страница 5: ...5 ...