VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/ResponseAPDU.h
blob: b9aa4adc0333fcbe147b5eebad915162fb77cd3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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