Releases: conradkleinespel/rpassword
v7.3.1
v7.3.0
v7.2.0
This release completely removes the dependency on serde
. It adds a new dependency rtoolbox
which are utility functions I use in multiple projects. This change is meant to improve supply chain security. I don't own serde
but I do own rtoolbox
. Code for rtoolbox
is available in the mono-repo.
No functionality changes in this release. It is backwards compatible.
v7.1.0
This release includes a fix from @LSchallot which allows users to hit Ctrl-U to remove the password and start from scratch, similar to when you hit Ctrl-U in your terminal to clear the line.
It also specifies a minimum Rust version in Cargo.toml
.
v7.0.0
This release contains a potentially breaking change in that it removes the dependency on serde
. But in most cases you should not need to change any of your code. Thanks @BlackHoleFox for the help.
Thanks also @NovaliX-Dev for fixing a bug on Windows, see 3858917.
You will need at least Rust 1.60 to use this new release.
v6.0.1
No code changes. Updated docs so they display correctly on sites such as https://docs.rs/rpassword and https://crates.io/crates/rpassword.
v6.0.0
This release contains breaking changes.
Notable changes:
- API changes to be more flexible and more generic;
- move to Rust 2018 edition;
- WASM/WASI support, thanks @john-sharratt.
The API has changed from:
pub fn read_password() -> Result<String>
pub fn read_password_from_tty(prompt: Option<&str>) -> ::std::io::Result<String>
pub fn read_password_with_reader<T: BufRead>(source: Option<&mut T>) -> Result<String>
pub fn prompt_password_stdout(prompt: &str) -> std::io::Result<String>
pub fn prompt_password_stderr(prompt: &str) -> std::io::Result<String>
To:
pub fn read_password_from_bufread(reader: &mut impl BufRead) -> std::io::Result<String>
pub fn read_password() -> std::io::Result<String>
pub fn prompt_password_from_bufread(reader: &mut impl BufRead, writer: &mut impl Write, prompt: impl ToString) -> std::io::Result<String>
pub fn prompt_password(prompt: impl ToString) -> std::io::Result<String>
By default, reading and writing is done from/to the TTY instead of stdin/stdout. This is more reliable for most cases. If you need to read or write from/to a different place, the function versions with from_bufread
allow you to pass anything you'd like.
v5.0.1
v5.0.0
There is 1 breaking change in this release.
If you use the read_password_with_reader
function, you will need to replace any calls to read_password_with_reader(Some(reader))
with read_password_with_reader(Some(&mut reader))
. This change allows calling read_password_with_reader
multiple times with the same reader, which makes unit testing much easier (see #46 for some background).
Thanks @dvermd for this contribution!