5#include <QtCore/QtEndian>
26 if (response.
size() < 2) {
45 apdu.
append(
static_cast<char>(cla));
46 apdu.
append(
static_cast<char>(ins));
50 bool extendedLc =
false;
55 apdu.
append(
static_cast<char>(nc));
59 apdu.
append(
static_cast<char>(nc >> 8));
60 apdu.
append(
static_cast<char>(nc & 0xFF));
67 apdu.
append(
static_cast<char>(ne));
68 }
else if (ne == 256) {
69 apdu.
append(
static_cast<char>(
'\0'));
73 apdu.
append(
static_cast<char>(ne >> 8));
74 apdu.
append(
static_cast<char>(ne & 0xFF));
qsizetype size() const noexcept
Returns the number of bytes in this byte array.
const char * constData() const noexcept
Returns a pointer to the const data stored in the byte array.
QByteArray left(qsizetype len) const
Returns a byte array that contains the first len bytes of this byte array.
QByteArray & append(char c)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QResponseApdu(const QByteArray &response={})
static constexpr uint16_t Empty
QByteArray build(uint8_t cla, uint8_t ins, uint8_t p1, uint8_t p2, QByteArrayView data, uint16_t ne=0)
Combined button and popup list for selecting options.
constexpr T qFromBigEndian(T source)
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data