From a3569628e03172850021d6310a9c83df1044beed Mon Sep 17 00:00:00 2001 From: Candifloss Date: Mon, 19 Jan 2026 22:55:12 +0530 Subject: [PATCH] Mask password input with asterisk --- src/tui.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tui.rs b/src/tui.rs index 6580cfd..32ea302 100644 --- a/src/tui.rs +++ b/src/tui.rs @@ -41,7 +41,9 @@ pub fn run() -> io::Result<(String, String)> { Style::default() }); - let pass = Paragraph::new(password.as_str()) + let masked_password = "*".repeat(password.len()); + + let pass = Paragraph::new(masked_password) .block(Block::default().borders(Borders::ALL).title("Password")) .style(if focus == 1 { Style::new().fg(Color::from_u32(0x00_235759))