VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/ResponseAPDU.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Common/ResponseAPDU.h')
-rw-r--r--src/Common/ResponseAPDU.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/Common/ResponseAPDU.h b/src/Common/ResponseAPDU.h
new file mode 100644
index 00000000..b9aa4adc
--- /dev/null
+++ b/src/Common/ResponseAPDU.h
@@ -0,0 +1,44 @@
+#ifndef TC_HEADER_Common_ResponseAPDU
+#define TC_HEADER_Common_ResponseAPDU
+
+#include "Platform/PlatformBase.h"
+
+namespace VeraCrypt
+{
+ class ResponseAPDU
+ {
+ protected:
+
+ vector<byte> m_data;
+
+ uint16 m_SW;
+
+ public:
+
+ void clear();
+
+ ResponseAPDU();
+
+ ResponseAPDU(const vector<byte>& data, uint16 SW);
+
+ uint32 getNr();
+
+ const vector<byte> getData();
+
+ byte getSW1();
+
+ byte getSW2();
+
+ uint16 getSW();
+
+ const vector<byte> getBytes();
+
+ void setSW(uint16 SW);
+ void setBytes(const vector<byte>& bytes);
+
+ void appendData(const vector<byte>& data);
+ void appendData(const byte* data, size_t dataLen);
+ };
+};
+
+#endif // TC_HEADER_Common_ResponseAPDU \ No newline at end of file