KeyData.fromBytes constructor

KeyData.fromBytes(
  1. List<int> response,
  2. KeySlot slot
)

Implementation

factory KeyData.fromBytes(List<int> response, KeySlot slot) {
  final data = TlvData.parse(response).get(0x7F49);
  if (data.hasValue(0x86)) {
    return ECKeyData.fromBytes(response, slot);
  } else {
    return RSAKeyData.fromBytes(response, slot);
  }
}