diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2015-01-26 10:14:09 +0100 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2015-02-08 10:07:33 +0100 |
commit | d01fa1198337f0f088c2b61484eb6678bb363598 (patch) | |
tree | 1d00add99f768d398265f9e8f5f8fb2211880b93 /src/Main/Forms/MainFrame.cpp | |
parent | 3d8d088b0646688fe567a36d5ab4a033e2d4505a (diff) | |
download | VeraCrypt-d01fa1198337f0f088c2b61484eb6678bb363598.tar.gz VeraCrypt-d01fa1198337f0f088c2b61484eb6678bb363598.zip |
Linux/MacOSX: use command line values of TrueCryptMode and PRF as defaults for the password dialog
Diffstat (limited to 'src/Main/Forms/MainFrame.cpp')
-rw-r--r-- | src/Main/Forms/MainFrame.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Main/Forms/MainFrame.cpp b/src/Main/Forms/MainFrame.cpp index ca4d7d63..08184005 100644 --- a/src/Main/Forms/MainFrame.cpp +++ b/src/Main/Forms/MainFrame.cpp @@ -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); |