diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2015-05-26 01:36:20 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2015-05-26 01:38:15 +0200 |
commit | 8ebf5ac605d57eab80b600a7827d2ba48668d887 (patch) | |
tree | 6159a4d45fd79b15746b44ee986ddedb923ab91d /src/Common/Password.h | |
parent | 85e5e383f9b879736d7a793a5dc0f9bce20b8383 (diff) | |
download | VeraCrypt-8ebf5ac605d57eab80b600a7827d2ba48668d887.tar.gz VeraCrypt-8ebf5ac605d57eab80b600a7827d2ba48668d887.zip |
Windows: first implementation of dynamic mode
Diffstat (limited to 'src/Common/Password.h')
-rw-r--r-- | src/Common/Password.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Common/Password.h b/src/Common/Password.h index 62fe23a7..5ccc44b3 100644 --- a/src/Common/Password.h +++ b/src/Common/Password.h @@ -15,6 +15,9 @@ // User text input limits
#define MIN_PASSWORD 1 // Minimum possible password length
#define MAX_PASSWORD 64 // Maximum possible password length
+#define MAX_PIN 10 // Maximum allowed digits in a PIN (enough for 32-bit value)
+#define MAX_BOOT_PIN 5 // Maximum allowed digits in a PIN for boot (enough for 16-bit value)
+#define MAX_BOOT_PIN_VALUE 65535
#define PASSWORD_LEN_WARNING 20 // Display a warning when a password is shorter than this
@@ -33,9 +36,9 @@ typedef struct #if defined(_WIN32) && !defined(TC_WINDOWS_DRIVER)
void VerifyPasswordAndUpdate ( HWND hwndDlg , HWND hButton , HWND hPassword , HWND hVerify , unsigned char *szPassword , char *szVerify, BOOL keyFilesEnabled );
-BOOL CheckPasswordLength (HWND hwndDlg, HWND hwndItem);
+BOOL CheckPasswordLength (HWND hwndDlg, HWND hwndItem, int pin, BOOL bForBoot);
BOOL CheckPasswordCharEncoding (HWND hPassword, Password *ptrPw);
-int ChangePwd (const char *lpszVolume, Password *oldPassword, int old_pkcs5, BOOL truecryptMode, Password *newPassword, int pkcs5, int wipePassCount, HWND hwndDlg);
+int ChangePwd (const char *lpszVolume, Password *oldPassword, int old_pkcs5, int old_pin, BOOL truecryptMode, Password *newPassword, int pkcs5, int pin, int wipePassCount, HWND hwndDlg);
#endif // defined(_WIN32) && !defined(TC_WINDOWS_DRIVER)
|