VeraCrypt
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Boot/Windows/BootMain.cpp11
-rw-r--r--src/ExpandVolume/WinMain.cpp1
-rw-r--r--src/Format/Tcformat.c1
-rw-r--r--src/Mount/Mount.c3
4 files changed, 9 insertions, 7 deletions
diff --git a/src/Boot/Windows/BootMain.cpp b/src/Boot/Windows/BootMain.cpp
index b29d3ff8..334762ea 100644
--- a/src/Boot/Windows/BootMain.cpp
+++ b/src/Boot/Windows/BootMain.cpp
@@ -60,6 +60,7 @@ static void PrintMainMenu ()
return;
Print (" Keyboard Controls:\r\n");
+ Print (" [F5] Hide/Show Password\r\n");
Print (" [Esc] ");
#ifndef TC_WINDOWS_BOOT_RESCUE_DISK_MODE
@@ -149,6 +150,7 @@ static byte AskPassword (Password &password)
size_t pos = 0;
byte scanCode;
byte asciiCode;
+ byte hidePassword = 1;
Print ("Enter password");
Print (PreventNormalSystemBoot ? " for hidden system:\r\n" : ": ");
@@ -178,6 +180,10 @@ static byte AskPassword (Password &password)
}
continue;
+ case TC_BIOS_KEY_F5:
+ hidePassword ^= 0x01;
+ continue;
+
default:
if (scanCode == TC_BIOS_KEY_ESC || IsMenuKey (scanCode))
{
@@ -196,10 +202,11 @@ static byte AskPassword (Password &password)
}
password.Text[pos++] = asciiCode;
+ if (hidePassword) asciiCode = '*';
if (pos < MAX_PASSWORD)
- PrintChar ('*');
+ PrintChar (asciiCode);
else
- PrintCharAtCursor ('*');
+ PrintCharAtCursor (asciiCode);
}
}
diff --git a/src/ExpandVolume/WinMain.cpp b/src/ExpandVolume/WinMain.cpp
index 19c5abe7..658f89ec 100644
--- a/src/ExpandVolume/WinMain.cpp
+++ b/src/ExpandVolume/WinMain.cpp
@@ -534,7 +534,6 @@ BOOL CALLBACK ExtcvPasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
}
SetCheckBox (hwndDlg, IDC_SHOW_PASSWORD, FALSE);
- EnableWindow (GetDlgItem (hwndDlg, IDC_SHOW_PASSWORD), FALSE);
SendMessage (GetDlgItem (hwndDlg, IDC_PASSWORD), EM_SETPASSWORDCHAR, '*', 0);
InvalidateRect (GetDlgItem (hwndDlg, IDC_PASSWORD), NULL, TRUE);
diff --git a/src/Format/Tcformat.c b/src/Format/Tcformat.c
index 2bff1963..1c0edd82 100644
--- a/src/Format/Tcformat.c
+++ b/src/Format/Tcformat.c
@@ -3932,7 +3932,6 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
bKeyboardLayoutChanged = TRUE;
}
- ShowWindow(GetDlgItem(hwndDlg, IDC_SHOW_PASSWORD), SW_HIDE);
if (SetTimer (MainDlg, TIMER_ID_KEYB_LAYOUT_GUARD, TIMER_INTERVAL_KEYB_LAYOUT_GUARD, NULL) == 0)
{
diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c
index 0aafbf60..f27c2d50 100644
--- a/src/Mount/Mount.c
+++ b/src/Mount/Mount.c
@@ -1744,8 +1744,6 @@ BOOL CALLBACK PasswordChangeDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
bKeyboardLayoutChanged = TRUE;
}
- ShowWindow(GetDlgItem(hwndDlg, IDC_SHOW_PASSWORD_CHPWD_NEW), SW_HIDE);
- ShowWindow(GetDlgItem(hwndDlg, IDC_SHOW_PASSWORD_CHPWD_ORI), SW_HIDE);
/* for system encryption, we can't change the PRF */
EnableWindow (GetDlgItem (hwndDlg, IDT_PKCS5_PRF), FALSE);
@@ -2279,7 +2277,6 @@ BOOL CALLBACK PasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa
}
SetCheckBox (hwndDlg, IDC_SHOW_PASSWORD, FALSE);
- EnableWindow (GetDlgItem (hwndDlg, IDC_SHOW_PASSWORD), FALSE);
SendMessage (GetDlgItem (hwndDlg, IDC_PASSWORD), EM_SETPASSWORDCHAR, '*', 0);
InvalidateRect (GetDlgItem (hwndDlg, IDC_PASSWORD), NULL, TRUE);