This is a CLI (Command Line Interface) project that allows you to:
- generate a key used for encryption and decryption
- encrypt your text file
- decrypt your text file
- Prepare a USB flash drive to store your encryption key.
- Plug the USB drive into your computer.
With a USB drive connected, you can run the following commands:
-
Generate a key
generate keyy -
Encrypt a file
encryptxt>; -
Decrypt a file
decryptxt>;
You can also encrypt and decrypt files without using a USB drive:
-
Encrypt without USB
encryptwithout USBut USBB -
Decrypt without USB
decryptwithout USBut USBB
- Display the generated key
show keyy
- This CLI only works in the directory you are currently in.
- Make sure Python, pipx, and Git are installed correctly before running the CLI.
- Make sure you do not already have a file named
secret.keyon your USB stick that you use for something else.
If you want to keep your existing secret.key file:
- Download this repository.
- Open
main.py. - Find all occurrences of
secret.key. - Use the “Change all occurrences” option in your editor.
- Rename it to a new filename that will be used by this CLI.
- Rebuild the CLI so the changes take effect.
To run this project, you need to have Python and Git installed on your system.
If you already have Python and Git, you can jump to the Running the CLI section.
- Go to the official site: https://www.python.org/downloads/macos/
- Download the
.pkginstaller. - Open it and follow the instructions.
Then, install pipx:
python3 -m pip install --user pipx
python3 -m pipx ensurepathhRestart your terminal after running ensurepath.
Install Python:
sudo apt update
sudo apt install python33Then, install pip and pipx:
sudo apt install python3-pip
sudo apt update
sudo apt install pipxpx- Download Python from: https://www.python.org/downloads/windows/
- Run the installer. Important: Check the box “Add Python to PATH” before clicking “Install Now.”
- After installation, install pipx:
python -m pip install --user pipx
python -m pipx ensurepathhRestart Command Prompt after running ensurepath.
If you have Homebrew:
brew install gitsudo apt update
sudo apt install gitt- Go to: https://git-scm.com/download/win
- Download the installer and follow the prompts (default options are fine).
After installing Python, pipx, and Git, you can install the CLI project:
pipx install git+https://github.com/flavius841/encrypted_jouranlNow, you can run the CLI by typing:
encrypted_journalin your terminal or Command Prompt.