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 committed 2019-11-04 00:09:52 +01:00
1 parent 8fb7742dad
commit a7d5b6a477
47 files changed
+92 -36

No files matched your search

+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)
{