VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/TLVParser.h
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2024-06-12 12:30:04 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2024-06-12 12:30:04 +0200
commit455a4f2176a5cfbe325e1e40cea20dd3e466b64c (patch)
tree7a84d0f768ee375ea9f648bbbdeac7a4906f13fb /src/Common/TLVParser.h
parentbf9f3ec4f0a987ae1591ab5466f6eee599203c85 (diff)
downloadVeraCrypt-455a4f2176a5cfbe325e1e40cea20dd3e466b64c.tar.gz
VeraCrypt-455a4f2176a5cfbe325e1e40cea20dd3e466b64c.zip
Avoid conflict with C++17 features std::byte by using uint8 type instead of byte
Diffstat (limited to 'src/Common/TLVParser.h')
-rw-r--r--src/Common/TLVParser.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Common/TLVParser.h b/src/Common/TLVParser.h
index b989ca41..2fc4a27c 100644
--- a/src/Common/TLVParser.h
+++ b/src/Common/TLVParser.h
@@ -10,16 +10,16 @@ namespace VeraCrypt
{
uint16 Tag; /* T */
uint16 Length; /* L */
- shared_ptr<vector<byte>> Value; /* V */
- byte TagSize;
- byte LengthSize;
+ shared_ptr<vector<uint8>> Value; /* V */
+ uint8 TagSize;
+ uint8 LengthSize;
uint16 MoreFlag; /* Used In Sub */
uint16 SubFlag; /* Does it have sub-nodes? */
shared_ptr<vector<shared_ptr<TLVNode>>> Subs;
TLVNode() : Tag(0), Length(0), TagSize(0), LengthSize(0), MoreFlag(0), SubFlag(0)
{
- Value = make_shared<vector<byte>>();
+ Value = make_shared<vector<uint8>>();
Subs = make_shared<vector<shared_ptr<TLVNode>>>();
}
@@ -37,10 +37,10 @@ namespace VeraCrypt
static shared_ptr<TLVNode> TLV_CreateNode();
/* Check if the bit is correct */
- static uint16 CheckBit(byte value, int bit);
+ static uint16 CheckBit(uint8 value, int bit);
/* Parsing one TLV node */
- static shared_ptr<TLVNode> TLV_Parse_One(byte* buf, size_t size);
+ static shared_ptr<TLVNode> TLV_Parse_One(uint8* buf, size_t size);
/* Parsing all TLV nodes */
static int TLV_Parse_SubNodes(shared_ptr<TLVNode> parent);
@@ -54,7 +54,7 @@ namespace VeraCrypt
public:
/* Parsing TLV from a buffer and constructing TLV structure */
- static shared_ptr<TLVNode> TLV_Parse(byte* buf, size_t size);
+ static shared_ptr<TLVNode> TLV_Parse(uint8* buf, size_t size);
/* Finding a TLV node with a particular tag */
static shared_ptr<TLVNode> TLV_Find(shared_ptr<TLVNode> node, uint16 tag);