mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 11:08:02 -06:00
Windows bootloader: Mask/unmask PIM value in bootloader the same way as the password
This commit is contained in:
@@ -64,7 +64,7 @@ static void PrintMainMenu ()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
Print (" Keyboard Controls:\r\n");
|
Print (" Keyboard Controls:\r\n");
|
||||||
Print (" [F5] Hide/Show Password\r\n");
|
Print (" [F5] Hide/Show Password and PIM\r\n");
|
||||||
Print (" [Esc] ");
|
Print (" [Esc] ");
|
||||||
|
|
||||||
#ifndef TC_WINDOWS_BOOT_RESCUE_DISK_MODE
|
#ifndef TC_WINDOWS_BOOT_RESCUE_DISK_MODE
|
||||||
@@ -246,6 +246,10 @@ static byte AskPassword (Password &password, int& pim)
|
|||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
case TC_BIOS_KEY_F5:
|
||||||
|
hidePassword ^= 0x01;
|
||||||
|
continue;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (scanCode == TC_BIOS_KEY_ESC || IsMenuKey (scanCode))
|
if (scanCode == TC_BIOS_KEY_ESC || IsMenuKey (scanCode))
|
||||||
{
|
{
|
||||||
@@ -265,7 +269,8 @@ static byte AskPassword (Password &password, int& pim)
|
|||||||
|
|
||||||
pim = 10*pim + (asciiCode - '0');
|
pim = 10*pim + (asciiCode - '0');
|
||||||
pos++;
|
pos++;
|
||||||
|
|
||||||
|
if (hidePassword) asciiCode = '*';
|
||||||
if (pos < MAX_PIM)
|
if (pos < MAX_PIM)
|
||||||
PrintChar (asciiCode);
|
PrintChar (asciiCode);
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user