Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show characters typed in decrypt-backup #594

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nimrod-a
Copy link
Contributor

@nimrod-a nimrod-a commented Jan 6, 2025

This PR addresses the improvement request to show characters typed in decrypt-backup as asterisks (*), so that people can follow the characters they typed (#581)

The rich library currently used by MVT does seem to support this feature.

password = Prompt.ask("Enter backup password", password=True) # rich library

The builtin password support of the library leads to the characters being completely hidden.

Using the popular promt_toolkit instead:

prompt('Enter backup password: ', is_password=True) # 
# > Enter backup password: *******

When the is_password=True flag has been given, the input is replaced by asterisks (* characters).

The downside is that another library is used for password inputs.
However, this is a fairly simple solution for the issue.

Alternatively, one could also try and write a custom password prompt using the rich library.

@nimrod-a nimrod-a changed the title Show characters typed in decrypt-backup; Fixes #581 Show characters typed in decrypt-backup Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant