diff --git a/keyfork-shard/src/openpgp/smartcard.rs b/keyfork-shard/src/openpgp/smartcard.rs index 83e87e8..c82a9ed 100644 --- a/keyfork-shard/src/openpgp/smartcard.rs +++ b/keyfork-shard/src/openpgp/smartcard.rs @@ -52,8 +52,8 @@ impl SmartcardManager { std::io::stdin().read_line(&mut String::new()).map(|_| ()) } - /// Utility function to obtain a prompt from the command line. - pub fn prompt_pin(&self, prompt: impl std::fmt::Display) -> std::io::Result { + /// Utility function to obtain a prompt response from the command line. + pub fn prompt_input(&self, prompt: impl std::fmt::Display) -> std::io::Result { eprint!("{prompt}: "); let mut output = String::new(); std::io::stdin().read_line(&mut output)?; @@ -201,7 +201,7 @@ impl DecryptionHelper for &mut SmartcardManager { .fingerprints()? .decryption() .map(|fp| Fingerprint::from_bytes(fp.as_bytes())); - let pin = self.prompt_pin("Please enter PIN to unlock card")?; + let pin = self.prompt_input("User PIN")?; let mut user = transaction.to_user_card(pin.as_str().trim())?; let mut decryptor = user.decryptor(&|| eprintln!("Touch confirmation needed for decryption"))?;