1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2026-07-06 21:18:01 -05:00

Linux/MacOSX: use command line values of TrueCryptMode and PRF as defaults for the password dialog

This commit is contained in:
Mounir IDRASSI
2015-01-26 10:14:09 +01:00
parent 3d8d088b06
commit d01fa11983
6 changed files with 33 additions and 9 deletions
+10
View File
@@ -664,6 +664,11 @@ namespace VeraCrypt
MountOptions mountOptions (GetPreferences().DefaultMountOptions);
mountOptions.SlotNumber = SelectedSlotNumber;
mountOptions.Path = GetSelectedVolumePath();
mountOptions.TrueCryptMode = CmdLine->ArgTrueCryptMode;
if (CmdLine->ArgHash)
{
mountOptions.Kdf = Pkcs5Kdf::GetAlgorithm (*CmdLine->ArgHash, CmdLine->ArgTrueCryptMode);
}
try
{
@@ -881,6 +886,11 @@ namespace VeraCrypt
SetVolumePath (favorite.Path);
MountOptions mountOptions (GetPreferences().DefaultMountOptions);
mountOptions.TrueCryptMode = CmdLine->ArgTrueCryptMode;
if (CmdLine->ArgHash)
{
mountOptions.Kdf = Pkcs5Kdf::GetAlgorithm (*CmdLine->ArgHash, CmdLine->ArgTrueCryptMode);
}
favorite.ToMountOptions (mountOptions);
shared_ptr <VolumeInfo> volume = Gui->MountVolume (mountOptions);