Created
May 30, 2023 18:47
-
-
Save hpkaushik121/7b3bcf99ff4120bdbeabf331b3b63528 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* | |
* Case 4s C-APDU | |
*/ | |
public static byte[] getProcessingOpts(DOL pdol, EMVApplication app) { | |
String command; | |
if (pdol != null && pdol.getTagAndLengthList().size() > 0) { | |
byte[] pdolResponseData = EMVTerminal.constructDOLResponse(pdol, app); | |
command = "80 A8 00 00"; | |
command += " " + Util.int2Hex(pdolResponseData.length + 2) + " 83 " + Util.int2Hex(pdolResponseData.length); //this PDOL get be fetch from response of SELECT command | |
command += " " + Util.prettyPrintHexNoWrap(pdolResponseData); | |
command += " 00"; // Le | |
} else { | |
command = "80 A8 00 00 02 83 00 00"; //Last 00 is Le | |
} | |
return Util.fromHexString(command); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment