VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Boot
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2015-04-28 21:47:59 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2015-05-03 13:47:25 (GMT)
commit0f2d32f01145f82fa83806e08ddde6cdce8a496d (patch)
tree30af8e41802c95cf0f3817576bbed28e5307091b /src/Boot
parenta1f1e34789d3693f821ec20cf147e2634f981249 (diff)
downloadVeraCrypt-0f2d32f01145f82fa83806e08ddde6cdce8a496d.zip
VeraCrypt-0f2d32f01145f82fa83806e08ddde6cdce8a496d.tar.gz
Windows: enable showing/hiding password for system encryption in Windows UI and in the bootloader (F5 key). This will be helpful to diagnose issues with non-US versions of Windows.
Diffstat (limited to 'src/Boot')
-rw-r--r--src/Boot/Windows/BootMain.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/Boot/Windows/BootMain.cpp b/src/Boot/Windows/BootMain.cpp
index b29d3ff..334762e 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);
}
}