VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Format/Tcformat.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Format/Tcformat.c')
-rw-r--r--src/Format/Tcformat.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/Format/Tcformat.c b/src/Format/Tcformat.c
index d83d9f49..02210b15 100644
--- a/src/Format/Tcformat.c
+++ b/src/Format/Tcformat.c
@@ -9000,20 +9000,22 @@ void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine)
9000 if (HAS_ARGUMENT == GetArgumentValue (lpszCommandLineArgs, 9000 if (HAS_ARGUMENT == GetArgumentValue (lpszCommandLineArgs,
9001 &i, nNoCommandLineArgs, szTmp, ARRAYSIZE (szTmp))) 9001 &i, nNoCommandLineArgs, szTmp, ARRAYSIZE (szTmp)))
9002 { 9002 {
9003 if (_wcsicmp(szTmp, L"sha512") == 0 || _wcsicmp(szTmp, L"sha-512") == 0) 9003 /* match against special names first */
9004 if (_wcsicmp(szTmp, L"sha512") == 0)
9004 CmdVolumePkcs5 = SHA512; 9005 CmdVolumePkcs5 = SHA512;
9005 else if (_wcsicmp(szTmp, L"whirlpool") == 0) 9006 else if (_wcsicmp(szTmp, L"sha256") == 0)
9006 CmdVolumePkcs5 = WHIRLPOOL;
9007 else if (_wcsicmp(szTmp, L"sha256") == 0 || _wcsicmp(szTmp, L"sha-256") == 0)
9008 CmdVolumePkcs5 = SHA256; 9007 CmdVolumePkcs5 = SHA256;
9009 else if (_wcsicmp(szTmp, L"ripemd160") == 0 || _wcsicmp(szTmp, L"ripemd-160") == 0) 9008 else if (_wcsicmp(szTmp, L"ripemd160") == 0)
9010 CmdVolumePkcs5 = RIPEMD160; 9009 CmdVolumePkcs5 = RIPEMD160;
9011 else 9010 else
9012 { 9011 {
9013 CmdVolumePkcs5 = 0; 9012 /* match using internal hash names */
9014 AbortProcess ("COMMAND_LINE_ERROR"); 9013 CmdVolumePkcs5 = HashGetIdByName (szTmp);
9014 if (0 == CmdVolumePkcs5)
9015 {
9016 AbortProcess ("COMMAND_LINE_ERROR");
9017 }
9015 } 9018 }
9016
9017 } 9019 }
9018 else 9020 else
9019 AbortProcess ("COMMAND_LINE_ERROR"); 9021 AbortProcess ("COMMAND_LINE_ERROR");