VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/Library/PasswordLib/ConsolePassword.c
diff options
context:
space:
mode:
authorkavsrf <kavsrf@gmail.com>2016-12-31 13:49:59 +0300
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2017-06-05 17:36:51 +0200
commitf2e878683655b885f8ab2d365a40993ef942dea7 (patch)
tree22dbf411fc9d99a7ad23aae489eb491bb37fe387 /Library/PasswordLib/ConsolePassword.c
parent659af8b2c1ee88a9ee78dd1b1a5fa7cae2302984 (diff)
downloadVeraCrypt-DCS-f2e878683655b885f8ab2d365a40993ef942dea7.tar.gz
VeraCrypt-DCS-f2e878683655b885f8ab2d365a40993ef942dea7.zip
DcsProp configuration keys
AutoLogin AutoPassword AuthorizeProgress AuthStartMsg AuthErrorMsg Random Authorization retry bug fix
Diffstat (limited to 'Library/PasswordLib/ConsolePassword.c')
-rw-r--r--Library/PasswordLib/ConsolePassword.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/Library/PasswordLib/ConsolePassword.c b/Library/PasswordLib/ConsolePassword.c
index 1d82fd0..797ee4a 100644
--- a/Library/PasswordLib/ConsolePassword.c
+++ b/Library/PasswordLib/ConsolePassword.c
@@ -59,8 +59,10 @@ AskConsolePwdInt(
for (i = 0; i < count; i++) {
OUT_PRINT(L"\b");
}
- for (i = 0; i < count; i++) {
- OUT_PRINT(L"*");
+ if (gPasswordProgress) {
+ for (i = 0; i < count; i++) {
+ OUT_PRINT(L"*");
+ }
}
}
}
@@ -98,7 +100,9 @@ AskConsolePwdInt(
continue;
}
else if (key.UnicodeChar == CHAR_BACKSPACE) {
- OUT_PRINT(L"\b \b");
+ if (gPasswordProgress || show) {
+ OUT_PRINT(L"\b \b");
+ }
if (asciiLine != NULL) asciiLine[--count] = '\0';
continue;
}
@@ -107,8 +111,7 @@ AskConsolePwdInt(
if (count < line_max - 1) {
if (show) {
OUT_PRINT(L"%c", key.UnicodeChar);
- }
- else {
+ } else if (gPasswordProgress) {
OUT_PRINT(L"*");
}
// save char
@@ -124,10 +127,12 @@ AskConsolePwdInt(
// Set end of line
if (asciiLine != NULL) {
asciiLine[count] = '\0';
- for (i = 0; i < count; i++) {
- OUT_PRINT(L"\b \b");
+ if (gPasswordProgress || show) {
+ for (i = 0; i < count; i++) {
+ OUT_PRINT(L"\b \b");
+ }
+ OUT_PRINT(L"*");
}
- OUT_PRINT(L"*");
}
OUT_PRINT(L"\n");
}