Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/quininer/ttyaskpass
a safely passphrase prompt library and application.
https://github.com/quininer/ttyaskpass
askpass getpass pass passphrase prompt rust
Last synced: 24 days ago
JSON representation
a safely passphrase prompt library and application.
- Host: GitHub
- URL: https://github.com/quininer/ttyaskpass
- Owner: quininer
- License: mit
- Created: 2016-02-14T19:57:30.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2019-10-05T07:06:52.000Z (about 5 years ago)
- Last Synced: 2024-10-11T12:08:10.761Z (about 1 month ago)
- Topics: askpass, getpass, pass, passphrase, prompt, rust
- Language: Rust
- Homepage:
- Size: 78.1 KB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ttyaskpass
[![travis-ci](https://travis-ci.org/quininer/ttyaskpass.svg?branch=master)](https://travis-ci.org/quininer/ttyaskpass)
[![crates](https://img.shields.io/crates/v/ttyaskpass.svg)](https://crates.io/crates/ttyaskpass)
[![license](https://img.shields.io/github/license/quininer/ttyaskpass.svg)](https://github.com/quininer/ttyaskpass/blob/master/LICENSE)
[![docs.rs](https://docs.rs/ttyaskpass/badge.svg)](https://docs.rs/ttyaskpass/)![ttyaskpass](ttyaskpass.png)
A safely passphrase prompt library and application,
support [Chroma-Hash](https://github.com/mattt/Chroma-Hash/)-like colorhash.usage
-----library:
```rust
use std::io::{ self, Write };
use ttyaskpass::AskPass;fn main() -> io::Result<()> {
let mut cli = AskPass::new([0; 32]);
let pass = cli.askpass("Password:")?;let mut stdout = io::stdout();
write!(&mut stdout, "Your password is ")?;
stdout.write_all(pass)?;
stdout.flush()?;Ok(())
}
```see [readme.rs](examples/readme.rs) and [ttyaskpass.rs](src/bin/ttyaskpass.rs).
application:
```bash
env SSH_ASKPASS=ttyaskpass ssh-add