diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2020-07-23 21:06:59 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2020-07-23 21:19:09 +0200 |
commit | 549a4f3c2f937dde900672ebff6ed605f8c9043d (patch) | |
tree | 406282334687edd251843ef8481cf7ba6e7e66e3 /Library/PasswordLib | |
parent | 2a915cd1e3eccca468364fea4fbe58e0bb8626f6 (diff) | |
download | VeraCrypt-DCS-549a4f3c2f937dde900672ebff6ed605f8c9043d.tar.gz VeraCrypt-DCS-549a4f3c2f937dde900672ebff6ed605f8c9043d.zip |
Add option "KeyboardInputDelay" in DcsProp to control the minimum delay supported between two key strokes (default is 100 ms)
Diffstat (limited to 'Library/PasswordLib')
-rw-r--r-- | Library/PasswordLib/ConsolePassword.c | 5 | ||||
-rw-r--r-- | Library/PasswordLib/PicturePassword.c | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/Library/PasswordLib/ConsolePassword.c b/Library/PasswordLib/ConsolePassword.c index 8588a19..8270290 100644 --- a/Library/PasswordLib/ConsolePassword.c +++ b/Library/PasswordLib/ConsolePassword.c @@ -50,8 +50,9 @@ AskConsolePwdInt( do {
key = GetKey();
- // Remove dirty chars 0.1s
- FlushInputDelay(100000);
+ // Remove dirty chars
+ if (gKeyboardInputDelay)
+ FlushInputDelay(gKeyboardInputDelay * 1000);
if (key.ScanCode == SCAN_ESC) {
*retCode = AskPwdRetCancel;
diff --git a/Library/PasswordLib/PicturePassword.c b/Library/PasswordLib/PicturePassword.c index aef71ab..7ce4014 100644 --- a/Library/PasswordLib/PicturePassword.c +++ b/Library/PasswordLib/PicturePassword.c @@ -32,6 +32,7 @@ UINT8 gPasswordVisible = 0; int gPasswordShowMark = 1;
UINT8 gPasswordProgress = 1;
int gPasswordTimeout = 0;
+UINTN gKeyboardInputDelay = 100;
int gPlatformLocked = 0;
int gTPMLocked = 0;
|