Purpose: educational demonstration of using cryptography.Fernet to encrypt/decrypt files in a safe, non-destructive way.
Not for malicious use. Do not use this project to encrypt systems you do not own or control. The author disclaims responsibility for misuse.
src/generate_key.py— generate a Fernet key and save tokeys/thekey.keysrc/encrypt.py— encrypts files inexamples/and produces.encfiles (keeps originals by default)src/decrypt.py— decrypts.encfiles inexamples/and writes.decfiles (keeps.encfiles)examples/— add test files here (e.g.,sample.txt).gitignore— keeps keys out of git
- Clone the repo and
cdinto it. - Create a Python virtual environment:
python3 -m venv venv source venv/bin/activate pip install -r requirements.txt