mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 11:08:02 -06:00
Linux: Add "new-hash" switch for changing PRF and remove "current-hash" switch which didin't fit the change password/keyfile logic.
This commit is contained in:
@@ -42,7 +42,6 @@ namespace VeraCrypt
|
||||
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"));
|
||||
@@ -63,6 +62,7 @@ namespace VeraCrypt
|
||||
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"));
|
||||
@@ -322,19 +322,19 @@ namespace VeraCrypt
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
@@ -61,10 +61,10 @@ namespace VeraCrypt
|
||||
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;
|
||||
|
||||
@@ -989,7 +989,7 @@ namespace VeraCrypt
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user