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