Skip to content

Releases: conradkleinespel/rpassword

v7.3.1

11 Nov 16:57
Compare
Choose a tag to compare

This release updates the README.md, so the latest version appears on crates.io.

No functionality changes in this release. It is backwards compatible.

v7.3.0

11 Nov 16:56
Compare
Choose a tag to compare

The winapi package has been replaced with the windows-sys package developed by Microsoft. Thanks for your help, @messense!

No functionality changes in this release. It is backwards compatible.

v7.2.0

26 Nov 18:40
Compare
Choose a tag to compare

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

20 Oct 16:08
Compare
Choose a tag to compare

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

12 Jul 22:27
Compare
Choose a tag to compare

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

14 Mar 19:03
3166db6
Compare
Choose a tag to compare

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

13 Mar 17:46
Compare
Choose a tag to compare

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

19 Jan 22:17
019dc56
Compare
Choose a tag to compare

Fixes a unit test, see #55. No changes in functionality.

v5.0.0

08 Aug 16:06
c786de1
Compare
Choose a tag to compare

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!

v4.0.5

21 Jan 00:25
Compare
Choose a tag to compare

Fixes a bug that prevented memory from being zeroed in case of an error. Thanks again @tov !

This should be non-breaking as long as you use an updated version of the Rust toolchain.