Skip to content

a safely passphrase prompt library and application.

License

Notifications You must be signed in to change notification settings

quininer/ttyaskpass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ttyaskpass

travis-ci crates license docs.rs

ttyaskpass

A safely passphrase prompt library and application, support Chroma-Hash-like colorhash.

usage

library:

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 and ttyaskpass.rs.

application:

env SSH_ASKPASS=ttyaskpass ssh-add </dev/null

About

a safely passphrase prompt library and application.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages