CommandAPDU constructor

CommandAPDU({
  1. required int cla,
  2. required int ins,
  3. required int p1,
  4. required int p2,
  5. Uint8List? data,
  6. int ne = 0,
})

Required parameters are cla, ins, p1, p2.

data represents additional command data and is optional. Max data length is 65535.

ne is optional and represents expected response length. Max ne is 65536. If ne is set to 0, ne won't be serialized and send with the command. If ne is set to 256 or 65536 ne will be encoded as 0x00, which means arbitrary long data is expected in the response.

Implementation

CommandAPDU(
    {required int cla,
    required int ins,
    required int p1,
    required int p2,
    final Uint8List? data,
    int ne = 0}) {
  this.cla = cla;
  this.ins = ins;
  this.p1 = p1;
  this.p2 = p2;
  this.data = data;
  this.ne = ne;
}