pub fn prompt_passphrase(prompt: &str) -> Result<String, Box<dyn error::Error>> {
    let passphrase = prompt_password_stderr(prompt)?;
    if !passphrase.is_empty() {
        let confirmed = rpassword::prompt_password_stderr("Enter same passphrase again: ")?;
        if confirmed != passphrase {
            return Err("Passphrases did not match".into());
        }
    }
    Ok(passphrase)
}
/// Prompts user for a passphrase and then asks for confirmirmation to check for mistakes
Prompts user for a passphrase and then asks for confirmirmation to check for mistakes
Prompts user for a passphrase and then asks for confirmirmation to check for mistakes
pub fn prompt_passphrase(prompt: &str) -> Result<String, Box<dyn error::Error>> {
    let passphrase = prompt_password_stderr(prompt)?;
    if !passphrase.is_empty() {
        let confirmed = rpassword::prompt_password_stderr("Enter same passphrase again: ")?;
        if confirmed != passphrase {
            return Err("Passphrases did not match".into());
        }
    }
    Ok(passphrase)
}
pub fn prompt_passphrase ( prompt : & str ) -> Result < String , Box < dyn error :: Error > > { let passphrase = prompt_password_stderr ( prompt ) ? ; if ! passphrase . is_empty ( ) { let confirmed = rpassword :: prompt_password_stderr ( " " ) ? ; if confirmed != passphrase { return Err ( " " . into ( ) ) ; } } Ok ( passphrase ) }
Prompts user for a passphrase and then asks for confirmirmation to check for mistakes
Prompts user for a passphrase and then asks for confirmirmation to check for mistakes
prompt
&str