A command-line(CLI)-based multi-user password manager in C/C++ using OpenSSL for AES-128 encryption, SHA256 hashing for authentication and SQLiteCpp for secure credential storage, resulting in a lightweight tool that safeguarded sensitive data with industry-standard cryptography.
Getting Started
This project was setup using CMake, a cross-platform build tool on a Mac computer system. Below are instructions to build and run the project on your local machine.
Git:
Use git to clone the repository. Then init and update submodule "SQLiteCpp".
git clone https://github.com/kejiahp/passlock.git
cd passlock
git submodule init
git submodule updateCMake Installation:
First check if CMake is installed on the system.
cmake --versionIf you see a message saying cmake is not recognized or something similar. Follow the steps below to install CMake on your computer.
CMake Installation MacOS and Windows:
Install CMake MacOS
brew install cmake # MacOSInstall CMake Windows
Follow this URL for Windows: https://cmake.org/download/
OpenSSL Installation MacOS and Windows
The project uses OpenSSL for hashing and encryption/decryption of credentials.
Check if OpenSSL is already installed
openssl --version # both MacOS and WindowsInstall OpenSSL MacOS
brew install opensslAfter installation, if openssl is still not found, ensure shell configuration file (.zshrc, .bash_profile, etc) is updated.
Install OpenSSL Windows
Follow this link How to install OpenSSL (3.0.1) on Windows 10 (64-bit). Installing versions 3.5.2 and above should be fine.
Build Project and Run the executable
Follow this steps once CMake and OpenSSL have been installed, do the following:
-
Go to the root directory of the project.
-
Within ./src/db/seed/seed.cpp; line 46, initialize the
adminSeedEmailandadminSeedPasswordvariables with an appropriate email and password. These are required to seed the database with an admin user. The default admin email and password areadmin@gmail.comandpassLockAdmin12345@respectively. -
Execute the build scripts:
sh build.sh #MacOS ./winbuild.bat # Windows Powershell winbuild.bat # Windows Command Prompt (CMD) -
Windows Powershell and CMD Emoji Configuration (OPTIONAL)
At times windows terminals need needs extra configurations allowing emojis to be displayed properlly the commands below help with that.
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8 # Windows Powershell chcp 65001 # Windows Command Prompt (CMD) -
Run the executable:
./build/src/passlock # MacOS .\build\src\Release\passlock.exe # Windows