VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Platform/Memory.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Platform/Memory.h')
-rw-r--r--src/Platform/Memory.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/Platform/Memory.h b/src/Platform/Memory.h
index e0d4bfe3..b124022f 100644
--- a/src/Platform/Memory.h
+++ b/src/Platform/Memory.h
@@ -85,7 +85,7 @@ namespace VeraCrypt
class Endian
{
public:
- static byte Big (const byte &x)
+ static uint8 Big (const uint8 &x)
{
return x;
}
@@ -117,7 +117,7 @@ namespace VeraCrypt
#endif
}
- static byte Little (const byte &x)
+ static uint8 Little (const uint8 &x)
{
return x;
}
@@ -157,22 +157,22 @@ namespace VeraCrypt
static uint32 MirrorBytes (const uint32 &x)
{
- uint32 n = (byte) x;
- n <<= 8; n |= (byte) (x >> 8);
- n <<= 8; n |= (byte) (x >> 16);
- return (n << 8) | (byte) (x >> 24);
+ uint32 n = (uint8) x;
+ n <<= 8; n |= (uint8) (x >> 8);
+ n <<= 8; n |= (uint8) (x >> 16);
+ return (n << 8) | (uint8) (x >> 24);
}
static uint64 MirrorBytes (const uint64 &x)
{
- uint64 n = (byte) x;
- n <<= 8; n |= (byte) (x >> 8);
- n <<= 8; n |= (byte) (x >> 16);
- n <<= 8; n |= (byte) (x >> 24);
- n <<= 8; n |= (byte) (x >> 32);
- n <<= 8; n |= (byte) (x >> 40);
- n <<= 8; n |= (byte) (x >> 48);
- return (n << 8) | (byte) (x >> 56);
+ uint64 n = (uint8) x;
+ n <<= 8; n |= (uint8) (x >> 8);
+ n <<= 8; n |= (uint8) (x >> 16);
+ n <<= 8; n |= (uint8) (x >> 24);
+ n <<= 8; n |= (uint8) (x >> 32);
+ n <<= 8; n |= (uint8) (x >> 40);
+ n <<= 8; n |= (uint8) (x >> 48);
+ return (n << 8) | (uint8) (x >> 56);
}
};
}