VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Mount/Mount.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Mount/Mount.c')
-rw-r--r--src/Mount/Mount.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c
index 28a43acf..e90a0571 100644
--- a/src/Mount/Mount.c
+++ b/src/Mount/Mount.c
@@ -8836,20 +8836,22 @@ void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine)
8836 if (HAS_ARGUMENT == GetArgumentValue (lpszCommandLineArgs, 8836 if (HAS_ARGUMENT == GetArgumentValue (lpszCommandLineArgs,
8837 &i, nNoCommandLineArgs, szTmp, ARRAYSIZE (szTmp))) 8837 &i, nNoCommandLineArgs, szTmp, ARRAYSIZE (szTmp)))
8838 { 8838 {
8839 if (_wcsicmp(szTmp, L"sha512") == 0 || _wcsicmp(szTmp, L"sha-512") == 0) 8839 /* match against special names first */
8840 if (_wcsicmp(szTmp, L"sha512") == 0)
8840 CmdVolumePkcs5 = SHA512; 8841 CmdVolumePkcs5 = SHA512;
8841 else if (_wcsicmp(szTmp, L"whirlpool") == 0) 8842 else if (_wcsicmp(szTmp, L"sha256") == 0)
8842 CmdVolumePkcs5 = WHIRLPOOL;
8843 else if (_wcsicmp(szTmp, L"sha256") == 0 || _wcsicmp(szTmp, L"sha-256") == 0)
8844 CmdVolumePkcs5 = SHA256; 8843 CmdVolumePkcs5 = SHA256;
8845 else if (_wcsicmp(szTmp, L"ripemd160") == 0 || _wcsicmp(szTmp, L"ripemd-160") == 0) 8844 else if (_wcsicmp(szTmp, L"ripemd160") == 0)
8846 CmdVolumePkcs5 = RIPEMD160; 8845 CmdVolumePkcs5 = RIPEMD160;
8847 else 8846 else
8848 { 8847 {
8849 CmdVolumePkcs5 = 0; 8848 /* match using internal hash names */
8850 AbortProcess ("COMMAND_LINE_ERROR"); 8849 CmdVolumePkcs5 = HashGetIdByName (szTmp);
8850 if (0 == CmdVolumePkcs5)
8851 {
8852 AbortProcess ("COMMAND_LINE_ERROR");
8853 }
8851 } 8854 }
8852
8853 } 8855 }
8854 else 8856 else
8855 AbortProcess ("COMMAND_LINE_ERROR"); 8857 AbortProcess ("COMMAND_LINE_ERROR");