conradkleinespel / rpassword

Cross platform Rust library to read a password in the terminal (Linux, BSD, OSX, Windows, WASM).
Apache License 2.0
244 stars 38 forks source link

Ask for retyping the password to catch typos #75

Closed ibotty closed 1 year ago

ibotty commented 1 year ago

It would be great to have a simple function that prompts for the password, then prompts for the password again and if they match, return.

conradkleinespel commented 1 year ago

Hello @ibotty , thanks for the suggestion. But this is outside the scope of what I want to support. The crate is meant to abstract the complexity of cross platform password reading / prompting and that's it.

ibotty commented 1 year ago

Well, I'd said that that's exactly a slightly different way of prompting for a password. In a way prompt to read is as easy. I don't want to argue though. This being outside scope is OK.

conradkleinespel commented 1 year ago

Emphasis on the cross platform part. Also because I don't think it's easy to anticipate every way people want to prompt. So I'd rather let people implement that on their end.