YAPP
Yet Another Password Prompt
yapp is a small library create for Rust based on the
console to provide simple,
testable password prompt for CLI apps.
Features
- Reads user passwords from the input, optionally with a prompt and
echoing replacement symbols (
*, or another of your choice). - Reads passwords interactively:
- Reads passwords non-interactively:
| - Using the
PasswordReader(optionallyPasswordReader + IsInteractive) trait in your code allows for mocking the entire library in tests (see an example1 and example2) - Thanks to using the
consolelibrary underneath, it handles unicode correctly (tested on Windows and Linux).
Usage Example
use PasswordReader;
use PasswordReader;
See examples for more.