1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2026-06-09 22:36:59 -05:00

Linux/MacOSX: Add switch to force the use of legacy maximum password length (64 UTF8 bytes)

The switch is --legacy-password-maxlength
This commit is contained in:
Mounir IDRASSI
2019-11-03 22:54:23 +01:00
parent 8fb7742dad
commit a7d5b6a477
47 changed files with 92 additions and 36 deletions
+2 -2
View File
@@ -125,7 +125,7 @@ namespace VeraCrypt
if (verify && verPhase)
{
shared_ptr <VolumePassword> verPassword = ToUTF8Password (passwordBuf, length);
shared_ptr <VolumePassword> verPassword = ToUTF8Password (passwordBuf, length, CmdLine->ArgUseLegacyPassword? VolumePassword::MaxLegacySize : VolumePassword::MaxSize);
if (*password != *verPassword)
{
@@ -136,7 +136,7 @@ namespace VeraCrypt
}
}
password = ToUTF8Password (passwordBuf, length);
password = ToUTF8Password (passwordBuf, length, CmdLine->ArgUseLegacyPassword? VolumePassword::MaxLegacySize : VolumePassword::MaxSize);
if (!verPhase)
{