mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 19:08:26 -06:00
Increase password maximum length to 128 bytes from 64 bytes
This commit is contained in:
@@ -16,7 +16,12 @@
|
||||
|
||||
// User text input limits
|
||||
#define MIN_PASSWORD 1 // Minimum possible password length
|
||||
#define MAX_PASSWORD 64 // Maximum possible password length
|
||||
#if defined(TC_WINDOWS_BOOT) || defined(_UEFI)
|
||||
#define MAX_PASSWORD 64 // Maximum possible password length
|
||||
#else
|
||||
#define MAX_LEGACY_PASSWORD 64 // Maximum possible legacy password length
|
||||
#define MAX_PASSWORD 128 // Maximum possible password length
|
||||
#endif
|
||||
#define MAX_PIM 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 5 // Maximum allowed digits in a PIM for boot (enough for 16-bit value)
|
||||
@@ -36,6 +41,18 @@ typedef struct
|
||||
char Pad[3]; // keep 64-bit alignment
|
||||
} Password;
|
||||
|
||||
#if defined(TC_WINDOWS_BOOT) || defined(_UEFI)
|
||||
#define PasswordLegacy Password
|
||||
#else
|
||||
typedef struct
|
||||
{
|
||||
// Modifying this structure can introduce incompatibility with previous versions
|
||||
unsigned __int32 Length;
|
||||
unsigned char Text[MAX_LEGACY_PASSWORD + 1];
|
||||
char Pad[3]; // keep 64-bit alignment
|
||||
} PasswordLegacy;
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) && !defined(TC_WINDOWS_DRIVER) && !defined(_UEFI)
|
||||
|
||||
void VerifyPasswordAndUpdate ( HWND hwndDlg , HWND hButton , HWND hPassword , HWND hVerify , unsigned char *szPassword , char *szVerify, BOOL keyFilesEnabled );
|
||||
|
||||
Reference in New Issue
Block a user