mirror of
https://github.com/veracrypt/VeraCrypt
synced 2024-11-24 12:03:28 +01:00
Windows: change command line switch for PRF selection to /hash in order to match its value on Linux/MacOSX. Support hash names with and without the '-' character.
This commit is contained in:
parent
07156b6c09
commit
94737b2a7a
@ -6804,7 +6804,7 @@ void ExtractCommandLine (HWND hwndDlg, char *lpszCommandLine)
|
|||||||
{ OptionTokenLib, "/tokenlib", NULL, FALSE },
|
{ OptionTokenLib, "/tokenlib", NULL, FALSE },
|
||||||
{ OptionVolume, "/volume", "/v", FALSE },
|
{ OptionVolume, "/volume", "/v", FALSE },
|
||||||
{ CommandWipeCache, "/wipecache", "/w", FALSE },
|
{ CommandWipeCache, "/wipecache", "/w", FALSE },
|
||||||
{ OptionPkcs5, "/prf", NULL , FALSE }
|
{ OptionPkcs5, "/hash", NULL , FALSE }
|
||||||
};
|
};
|
||||||
|
|
||||||
argumentspec as;
|
argumentspec as;
|
||||||
@ -7009,13 +7009,13 @@ void ExtractCommandLine (HWND hwndDlg, char *lpszCommandLine)
|
|||||||
if (HAS_ARGUMENT == GetArgumentValue (lpszCommandLineArgs,
|
if (HAS_ARGUMENT == GetArgumentValue (lpszCommandLineArgs,
|
||||||
nArgPos, &i, nNoCommandLineArgs, szTmp, sizeof (szTmp)))
|
nArgPos, &i, nNoCommandLineArgs, szTmp, sizeof (szTmp)))
|
||||||
{
|
{
|
||||||
if (_stricmp(szTmp, "sha512") == 0)
|
if (_stricmp(szTmp, "sha512") == 0 || _stricmp(szTmp, "sha-512") == 0)
|
||||||
CmdVolumePkcs5 = SHA512;
|
CmdVolumePkcs5 = SHA512;
|
||||||
else if (_stricmp(szTmp, "whirlpool") == 0)
|
else if (_stricmp(szTmp, "whirlpool") == 0)
|
||||||
CmdVolumePkcs5 = WHIRLPOOL;
|
CmdVolumePkcs5 = WHIRLPOOL;
|
||||||
else if (_stricmp(szTmp, "sha256") == 0)
|
else if (_stricmp(szTmp, "sha256") == 0 || _stricmp(szTmp, "sha-256") == 0)
|
||||||
CmdVolumePkcs5 = SHA256;
|
CmdVolumePkcs5 = SHA256;
|
||||||
else if (_stricmp(szTmp, "ripemd160") == 0)
|
else if (_stricmp(szTmp, "ripemd160") == 0 || _stricmp(szTmp, "ripemd-160") == 0)
|
||||||
CmdVolumePkcs5 = RIPEMD160;
|
CmdVolumePkcs5 = RIPEMD160;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user