mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2026-06-09 22:36:59 -05:00
Windows: use correct default PIM value for Argon2 when validating small PIM values
This commit is contained in:
@@ -137,7 +137,7 @@ BOOL CheckPasswordCharEncoding (HWND hPassword, Password *ptrPw)
|
||||
BOOL CheckPasswordLength (HWND hwndDlg, unsigned __int32 passwordLength, int pim, BOOL bForBoot, int bootPRF, BOOL bSkipPasswordWarning, BOOL bSkipPimWarning)
|
||||
{
|
||||
BOOL bootPimCondition = (bForBoot && (bootPRF != SHA512 && bootPRF != WHIRLPOOL))? TRUE : FALSE;
|
||||
BOOL bCustomPimSmall = ((pim != 0) && (pim < (bootPimCondition? 98 : 485)))? TRUE : FALSE;
|
||||
BOOL bCustomPimSmall = ((pim != 0) && (pim < (bootPimCondition? 98 : bootPRF == ARGON2? 12 : 485)))? TRUE : FALSE;
|
||||
if (passwordLength < PASSWORD_LEN_WARNING)
|
||||
{
|
||||
if (bCustomPimSmall)
|
||||
@@ -159,7 +159,7 @@ BOOL CheckPasswordLength (HWND hwndDlg, unsigned __int32 passwordLength, int pim
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((pim != 0) && (pim > (bootPimCondition? 98 : 485)))
|
||||
if ((pim != 0) && (pim > (bootPimCondition? 98 : bootPRF == ARGON2? 12 : 485)))
|
||||
{
|
||||
// warn that mount/boot will take more time
|
||||
Warning ("PIM_LARGE_WARNING", hwndDlg);
|
||||
|
||||
Reference in New Issue
Block a user