ResponseAPDU.fromBytes constructor

ResponseAPDU.fromBytes(
  1. Uint8List apduBytes
)

Implementation

ResponseAPDU.fromBytes(final Uint8List apduBytes) {
  if (apduBytes.length < 2) {
    throw ArgumentError("Invalid raw response APDU length");
  }

  if (apduBytes.length > 2) {
    _data = apduBytes.sublist(0, apduBytes.length - 2);
  }

  _sw = StatusWord.fromBytes(apduBytes, apduBytes.length - 2);
}