1657 views|0 replies
- Last login
- 2024-10-18
- Online Time
- 124 hours
- Prestige
- 757 points
- Points
- 576 points
|
Design example: Card 82H external authentication, ESAM04H, 05H, 06H external authentication
[Copy link]
/******************************************* Function name: AllExternVerify Function function: Card 82H external authentication, ESAM04H, 05H, 06H external authentication Input parameter: cApplySerialNumber2[8] Card application serial number Output parameter: Authentication result Description: Card 82H external authentication--ESAM04H--ESAM05H--ESAM06H external authentication **********************************************/ unsigned char AllExternVerify(unsigned char cApplySerialNumber2[8]) { //Card external authentication icflag1=ICSAM|icflag1; CardAndEsamExternVerify(cApplySerialNumber2,CardInfoUpKey); if(!((ErrorCardExtAuthBIT+ErrorReadWriteBIT)&iErrorRWrCard)) { //esam 04H external authentication, information update external authentication EsamExternVerify(EsamInfoUpdateKEY,CardInfoUpdateKEY); if(!((ErrorEsamExtAuthBIT+ErrorReadWriteBIT)&iErrorRWrCard)) { //esam 05H external authentication, key update external authentication//EsamExternVerify(EsamKEYUpdateKey,CardKEYUpdateKey); //if(!((ErrorEsamExtAuthBIT+ErrorReadWriteBIT)&iErrorRWrCard)) //{ //esam 06H external authentication, gas volume update external authentication//EsamExternVerify(EsamVolumeUpdateKey,CardVolumeUpdateKey); //if(!((ErrorEsamExtAuthBIT+ErrorReadWriteBIT)&iErrorRWrCard)) //{ return 1; //} //} } } return 0; }
|
|