VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Main/Main.h
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2016-05-02 12:45:22 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2016-05-04 11:14:05 (GMT)
commitb261177b8f5bc3f8495406d13dc03c0328b930f9 (patch)
tree535b8a6345c63529b3bc72f42d02c27c6aed64e3 /src/Main/Main.h
parent0b914c8f5d690dfc1bdfbca1e1083372c5ed84d8 (diff)
downloadVeraCrypt-b261177b8f5bc3f8495406d13dc03c0328b930f9.zip
VeraCrypt-b261177b8f5bc3f8495406d13dc03c0328b930f9.tar.gz
Windows/Linux/MacOSX: Set maximum PIM value to 2147468 in order to avoid having negative values for iterations count using the formula 15000 + (PIM x 1000). Add specific error message to XML language files.
Diffstat (limited to 'src/Main/Main.h')
-rw-r--r--src/Main/Main.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Main/Main.h b/src/Main/Main.h
index a35bf78..e9d7e83 100644
--- a/src/Main/Main.h
+++ b/src/Main/Main.h
@@ -18,4 +18,9 @@
#include "Core/Core.h"
#include "Main/StringFormatter.h"
+#define MAX_PIM_DIGITS 7 // Maximum allowed digits in a PIM (enough for maximum value)
+#define MAX_PIM_VALUE 2147468 // Maximum value to have a positive 32-bit result for formula 15000 + (PIM x 1000)
+#define MAX_BOOT_PIM_DIGITS 5 // Maximum allowed digits in a PIM for boot (enough for 16-bit value)
+#define MAX_BOOT_PIM_VALUE 65535
+
#endif // TC_HEADER_Main_Main