This Rust package allows you to safely read passwords from standard input in a console application.
You can build the documentation with cargo doc
or view it online.
Add rpassword
as a dependency in Cargo.toml:
toml
[dependencies]
rpassword = "0.1"
Import the rpassword
crate and use the read_password()
function:
```rust extern crate rpassword;
use rpassword::read_password;
fn main() { print!("Type a password: "); let password = read_password().unwrap(); println!("The password is: '{}'", password); } ```