This is a simple password manager written in Rust. It allows you to manage passwords and perform various operations using command-line input.
Work in progress.
- Rust programming language
- Cargo package manager
-
Clone the repository:
git clone https://github.com/Arne91/password_manager.git
-
Navigate to the project directory:
cd password_manager
-
Build the project using Cargo:
cargo build
-
Run the executable:
cargo run
Upon running the program, you will be prompted to enter a command. The available commands are as follows:
exit
: Terminates the program.load <database>
: Prompts for a database.close
: Close the databaseshow
: Show databasehelp
: Displays a list of available commands.
Enter the desired command and press Enter to execute it. The program will perform the corresponding action and provide any relevant output.
The project consists of the following files:
main.rs
: Contains the main entry point of the program.json_db.rs
: Defines theJsonDB
struct and its methods for managing JSON databases.process_commands.rs
: Implements theProcessCommands
enum and its associated methods for processing user input.utils.rs
: Provides utility functions for getting user input and passwords.
The program uses a JSON database (JsonDB
) to store password entries. The JsonDB
is in progress.
The JsonDB
struct implements the DbEntryTrait
trait, which defines methods for creating and reading entries in the database.
To ensure password security, the program uses the rpassword
crate to read passwords securely without displaying them on the console. The get_password
function retrieves a password from the user.
The program utilizes the Tokio asynchronous runtime (tokio::main
) to handle asynchronous input processing. It uses the select!
macro to await user input or exit the program.
This project is licensed under the MIT License.