VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Main/TextUserInterface.cpp
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2019-11-03 22:54:23 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2019-11-04 00:09:52 +0100
commita7d5b6a4774c92736c89e8d6122b13c75c8d17c8 (patch)
tree23d04cec3780b028473695ffaeb1c264e4dab901 /src/Main/TextUserInterface.cpp
parent8fb7742dadedcae9cc57f08460d44418f0735ec5 (diff)
downloadVeraCrypt-a7d5b6a4774c92736c89e8d6122b13c75c8d17c8.tar.gz
VeraCrypt-a7d5b6a4774c92736c89e8d6122b13c75c8d17c8.zip
Linux/MacOSX: Add switch to force the use of legacy maximum password length (64 UTF8 bytes)
The switch is --legacy-password-maxlength
Diffstat (limited to 'src/Main/TextUserInterface.cpp')
-rw-r--r--src/Main/TextUserInterface.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Main/TextUserInterface.cpp b/src/Main/TextUserInterface.cpp
index 1e007fc7..69d45af4 100644
--- a/src/Main/TextUserInterface.cpp
+++ b/src/Main/TextUserInterface.cpp
@@ -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)
{