24 EXTERNAL_AUTHENTICATE = 0x82,
26 GENERAL_AUTHENTICATE = 0x86,
29 RESET_RETRY_COUNTER = 0x2C,
53 CHIP_AUTHENTICATION = 0x41,
54 TERMINAL_AUTHENTICATION = 0x81,
55 AUTHENTICATION_TEMPLATE = 0xA4,
56 DIGITAL_SIGNATURE_TEMPLATE = 0xB6,
57 SELF_DESCRIPTIVE = 0xBE,
61 static const int NO_LE = 0;
62 static const int SHORT_MAX_LC = 0xFF;
63 static const int SHORT_MAX_LE = 0x0100;
64 static const int EXTENDED_MAX_LC = 0x00FFFF;
65 static const int EXTENDED_MAX_LE = 0x010000;
67 [[nodiscard]]
static bool isExtendedLength(
const QByteArray& pData,
int pLe);
69 explicit CommandApdu(
const QByteArray& pBuffer = QByteArray());
70 explicit CommandApdu(
const QByteArray& pHeader,
const QByteArray& pData,
int pLe = NO_LE);
71 explicit CommandApdu(Ins pIns, uchar pP1, uchar pP2,
const QByteArray& pData = QByteArray(),
int pLe = NO_LE);
72 virtual ~CommandApdu();
74 [[nodiscard]]
bool isProprietary()
const;
76 void enableCommandChaining();
77 [[nodiscard]]
bool isCommandChaining()
const;
79 void setSecureMessaging(
bool pEnabled);
80 [[nodiscard]]
bool isSecureMessaging()
const;
82 [[nodiscard]]
bool isEmpty()
const;
83 [[nodiscard]] Ins getINS()
const;
84 [[nodiscard]] uchar getP1()
const;
85 [[nodiscard]] uchar getP2()
const;
86 [[nodiscard]] QByteArray getHeaderBytes()
const;
87 [[nodiscard]]
const QByteArray& getData()
const;
88 [[nodiscard]]
int getLe()
const;
89 [[nodiscard]]
bool isExtendedLength()
const;
91 [[nodiscard]] QByteArray generateLengthField(
int pLength)
const;
92 operator QByteArray()
const;