VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Crypto/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Crypto/config.h')
-rw-r--r--src/Crypto/config.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Crypto/config.h b/src/Crypto/config.h
index da9276db..d3638121 100644
--- a/src/Crypto/config.h
+++ b/src/Crypto/config.h
@@ -38,6 +38,10 @@
#endif
#endif
+#if defined(_MSC_VER) && (_MSC_VER > 1200)
+ #define CRYPTOPP_MSVC6PP_OR_LATER
+#endif
+
#ifndef CRYPTOPP_ALIGN_DATA
#if defined(_MSC_VER)
#define CRYPTOPP_ALIGN_DATA(x) __declspec(align(x))
@@ -172,6 +176,12 @@
#endif
#endif
+// this version of the macro is fastest on Pentium 3 and Pentium 4 with MSVC 6 SP5 w/ Processor Pack
#define GETBYTE(x, y) (unsigned int)((unsigned char)((x)>>(8*(y))))
+// these may be faster on other CPUs/compilers
+// #define GETBYTE(x, y) (unsigned int)(((x)>>(8*(y)))&255)
+// #define GETBYTE(x, y) (((byte *)&(x))[y])
+
+#define CRYPTOPP_GET_BYTE_AS_BYTE(x, y) ((byte)((x)>>(8*(y))))
#endif