internalAuthenticate method
Sends INTERNAL AUTHENTICATE command to ICC. ICC should return it's computed authentication data. Can throw ICCError or ComProviderError.
Implementation
Future<Uint8List> internalAuthenticate(
{required Uint8List data,
int p1 = 0x00,
int p2 = 0x00,
required int ne,
int cla = ISO7816_CLA.NO_SM}) async {
final rapdu = await _transceive(CommandAPDU(
cla: cla,
ins: ISO7816_INS.INTERNAL_AUTHENTICATE,
p1: p1,
p2: p2,
data: data,
ne: ne));
if (rapdu.status != StatusWord.success) {
throw ICCError("Internal authenticate failed", rapdu.status, rapdu.data);
}
return rapdu.data!;
}