This repository has been archived on 2026-04-25. You can view files and clone it, but cannot push or open issues or pull requests.
RustyPass/src/interface.rs

22 lines
624 B
Rust
Raw Normal View History

// Libraries
use std::io;
// Functions
pub fn int_auth() -> (String, String) {
// Variables
let mut username: String = String::new();
let mut password: String = String::new();
// Asking for the username
println!(" - LOGIN - ");
println!("Username: ");
io::stdin().read_line(&mut username).expect("Failed to read line");
username = String::from(username.to_lowercase().trim());
// Asking for the password
println!("Password: ");
io::stdin().read_line(&mut password).expect("Failed to read line");
password = String::from(password.trim());
return (username, password);
}