VeraCrypt
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2015-07-19 09:30:57 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2015-07-19 11:29:47 +0200
commit4fcf5c921c2fa8ca9d793f502ad510da2013a4d3 (patch)
tree8abdfd664cfb96bca2ba6725c0f081e535884eec
parent515895342820a9d0a35391ec4d316c3782a75768 (diff)
downloadVeraCrypt-4fcf5c921c2fa8ca9d793f502ad510da2013a4d3.tar.gz
VeraCrypt-4fcf5c921c2fa8ca9d793f502ad510da2013a4d3.zip
Linux: Add "new-hash" switch for changing PRF and remove "current-hash" switch which didin't fit the change password/keyfile logic.
-rw-r--r--src/Main/CommandLineInterface.cpp10
-rw-r--r--src/Main/CommandLineInterface.h2
-rw-r--r--src/Main/UserInterface.cpp2
3 files changed, 7 insertions, 7 deletions
diff --git a/src/Main/CommandLineInterface.cpp b/src/Main/CommandLineInterface.cpp
index c3c82f42..ce8b1c70 100644
--- a/src/Main/CommandLineInterface.cpp
+++ b/src/Main/CommandLineInterface.cpp
@@ -41,9 +41,8 @@ namespace VeraCrypt
#endif
parser.AddSwitch (L"C", L"change", _("Change password or keyfiles"));
parser.AddSwitch (L"c", L"create", _("Create new volume"));
parser.AddSwitch (L"", L"create-keyfile", _("Create new keyfile"));
- parser.AddOption (L"", L"current-hash", _("Current hash algorithm for change password/keyfiles operation"));
parser.AddSwitch (L"", L"delete-token-keyfiles", _("Delete security token keyfiles"));
parser.AddSwitch (L"d", L"dismount", _("Dismount volume"));
parser.AddSwitch (L"", L"display-password", _("Display password while typing"));
parser.AddOption (L"", L"encryption", _("Encryption algorithm"));
@@ -62,8 +61,9 @@ namespace VeraCrypt
parser.AddSwitch (L"", L"list-token-keyfiles", _("List security token keyfiles"));
parser.AddSwitch (L"", L"load-preferences", _("Load user preferences"));
parser.AddSwitch (L"", L"mount", _("Mount volume interactively"));
parser.AddOption (L"m", L"mount-options", _("VeraCrypt volume mount options"));
+ parser.AddOption (L"", L"new-hash", _("New hash algorithm"));
parser.AddOption (L"", L"new-keyfiles", _("New keyfiles"));
parser.AddOption (L"", L"new-password", _("New password"));
parser.AddOption (L"", L"new-pim", _("New PIM"));
parser.AddSwitch (L"", L"non-interactive", _("Do not interact with user"));
@@ -321,21 +321,21 @@ namespace VeraCrypt
if (!ArgHash)
throw_err (LangString["UNKNOWN_OPTION"] + L": " + str);
}
- if (parser.Found (L"current-hash", &str))
+ if (parser.Found (L"new-hash", &str))
{
- ArgCurrentHash.reset();
+ ArgNewHash.reset();
foreach (shared_ptr <Hash> hash, Hash::GetAvailableAlgorithms())
{
wxString hashName (hash->GetName());
wxString hashAltName (hash->GetAltName());
if (hashName.IsSameAs (str, false) || hashAltName.IsSameAs (str, false))
- ArgCurrentHash = hash;
+ ArgNewHash = hash;
}
- if (!ArgCurrentHash)
+ if (!ArgNewHash)
throw_err (LangString["UNKNOWN_OPTION"] + L": " + str);
}
if (parser.Found (L"keyfiles", &str))
diff --git a/src/Main/CommandLineInterface.h b/src/Main/CommandLineInterface.h
index cb08b393..9e575ee7 100644
--- a/src/Main/CommandLineInterface.h
+++ b/src/Main/CommandLineInterface.h
@@ -60,12 +60,12 @@ namespace VeraCrypt
shared_ptr <FilePath> ArgFilePath;
VolumeCreationOptions::FilesystemType::Enum ArgFilesystem;
bool ArgForce;
shared_ptr <Hash> ArgHash;
- shared_ptr <Hash> ArgCurrentHash;
shared_ptr <KeyfileList> ArgKeyfiles;
MountOptions ArgMountOptions;
shared_ptr <DirectoryPath> ArgMountPoint;
+ shared_ptr <Hash> ArgNewHash;
shared_ptr <KeyfileList> ArgNewKeyfiles;
shared_ptr <VolumePassword> ArgNewPassword;
int ArgNewPim;
bool ArgNoHiddenVolumeProtection;
diff --git a/src/Main/UserInterface.cpp b/src/Main/UserInterface.cpp
index 9abe0e6a..e8aad5bc 100644
--- a/src/Main/UserInterface.cpp
+++ b/src/Main/UserInterface.cpp
@@ -988,9 +988,9 @@ namespace VeraCrypt
BackupVolumeHeaders (cmdLine.ArgVolumePath);
return true;
case CommandId::ChangePassword:
- ChangePassword (cmdLine.ArgVolumePath, cmdLine.ArgPassword, cmdLine.ArgPim, cmdLine.ArgCurrentHash, cmdLine.ArgTrueCryptMode, cmdLine.ArgKeyfiles, cmdLine.ArgNewPassword, cmdLine.ArgNewPim, cmdLine.ArgNewKeyfiles, cmdLine.ArgHash);
+ ChangePassword (cmdLine.ArgVolumePath, cmdLine.ArgPassword, cmdLine.ArgPim, cmdLine.ArgHash, cmdLine.ArgTrueCryptMode, cmdLine.ArgKeyfiles, cmdLine.ArgNewPassword, cmdLine.ArgNewPim, cmdLine.ArgNewKeyfiles, cmdLine.ArgNewHash);
return true;
case CommandId::CreateKeyfile:
CreateKeyfile (cmdLine.ArgFilePath);