mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 11:08:02 -06:00
Linux/MacOSX: Implement TrueCrypt conversion and loading support. Correct many GTK issues linked to multi-threaded origine of events by implementing an automatic mechanism for handling such requests in the main thread.
This commit is contained in:
12
src/Main/Forms/VolumePasswordPanel.cpp
Executable file → Normal file
12
src/Main/Forms/VolumePasswordPanel.cpp
Executable file → Normal file
@@ -14,7 +14,7 @@
|
||||
|
||||
namespace VeraCrypt
|
||||
{
|
||||
VolumePasswordPanel::VolumePasswordPanel (wxWindow* parent, shared_ptr <VolumePassword> password, shared_ptr <KeyfileList> keyfiles, bool enableCache, bool enablePassword, bool enableKeyfiles, bool enableConfirmation, bool enablePkcs5Prf, bool isMountPassword, const wxString &passwordLabel)
|
||||
VolumePasswordPanel::VolumePasswordPanel (wxWindow* parent, shared_ptr <VolumePassword> password, bool disableTruecryptMode, shared_ptr <KeyfileList> keyfiles, bool enableCache, bool enablePassword, bool enableKeyfiles, bool enableConfirmation, bool enablePkcs5Prf, bool isMountPassword, const wxString &passwordLabel)
|
||||
: VolumePasswordPanelBase (parent), Keyfiles (new KeyfileList)
|
||||
{
|
||||
if (keyfiles)
|
||||
@@ -63,6 +63,7 @@ namespace VeraCrypt
|
||||
|
||||
Pkcs5PrfStaticText->Show (enablePkcs5Prf);
|
||||
Pkcs5PrfChoice->Show (enablePkcs5Prf);
|
||||
TrueCryptModeCheckBox->Show (!disableTruecryptMode);
|
||||
HeaderWipeCountText->Show (enablePkcs5Prf && !isMountPassword);
|
||||
HeaderWipeCount->Show (enablePkcs5Prf && !isMountPassword);
|
||||
|
||||
@@ -74,7 +75,7 @@ namespace VeraCrypt
|
||||
Pkcs5PrfChoice->Delete (0);
|
||||
Pkcs5PrfChoice->Append (LangString["AUTODETECTION"]);
|
||||
}
|
||||
foreach_ref (const Pkcs5Kdf &kdf, Pkcs5Kdf::GetAvailableAlgorithms())
|
||||
foreach_ref (const Pkcs5Kdf &kdf, Pkcs5Kdf::GetAvailableAlgorithms(false))
|
||||
{
|
||||
if (!kdf.IsDeprecated() || isMountPassword)
|
||||
Pkcs5PrfChoice->Append (kdf.GetName());
|
||||
@@ -190,7 +191,7 @@ namespace VeraCrypt
|
||||
{
|
||||
try
|
||||
{
|
||||
return Pkcs5Kdf::GetAlgorithm (wstring (Pkcs5PrfChoice->GetStringSelection()));
|
||||
return Pkcs5Kdf::GetAlgorithm (wstring (Pkcs5PrfChoice->GetStringSelection()), GetTrueCryptMode());
|
||||
}
|
||||
catch (ParameterIncorrect&)
|
||||
{
|
||||
@@ -198,6 +199,11 @@ namespace VeraCrypt
|
||||
}
|
||||
}
|
||||
|
||||
bool VolumePasswordPanel::GetTrueCryptMode () const
|
||||
{
|
||||
return TrueCryptModeCheckBox->GetValue ();
|
||||
}
|
||||
|
||||
int VolumePasswordPanel::GetHeaderWipeCount () const
|
||||
{
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user