Skip to content

Mugeha/flask-encryption-tool

Repository files navigation

🔐 Encryption & Decryption Web App

A simple yet secure web application built using Flask and Fernet encryption from the cryptography library. Users can enter text to encrypt or decrypt messages in a clean and minimal UI. This project is ideal for anyone learning about web security and Python-based cryptography.


🌐 Live Demo

👉 Click to Try the App Live


🎥 Video Walkthrough

📹 Watch Loom Demo Walkthrough


📝 Blog Post

📘 Read the Build Journey on My Blog


⚙️ Tech Stack

  • Python 3.x
  • Flask
  • Cryptography (Fernet)
  • python-dotenv
  • HTML/CSS (Jinja2)
  • Render for deployment

🚀 Getting Started

1. Clone the repository

git clone https://github.com/your-username/encryption-tool.git
cd encryption-tool

2. Create a virtual environment (optional but recommended)

python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

3. Install dependencies

pip install -r requirements.txt

4. Environment Setup

Create a .env file in your project root directory with the following content:

SECRET_KEY=your_fernet_generated_key_here
FLASK_SECRET_KEY=your_flask_secret_key_here

To generate keys:

Fernet key:

from cryptography.fernet import Fernet  
print(Fernet.generate_key().decode())

Flask-secret-key

python -c "import secrets; print(secrets.token_hex(32))"

5. How It Works

  • Encryption: Enter plain text and click Encrypt.
  • The text is encoded and encrypted using Fernet symmetric encryption.
  • Decryption: Paste the encrypted text and click Decrypt. If valid, it shows the original message.

6. Project Structure

encryption-tool/

├── templates/

│ └── index.html

├── .env

├── .gitignore

├── requirements.txt

├── simple_encryptor.py # Optional helper module

└── web_app.py # Main Flask app

7. Screenshots

Guiversion

Encryption

Decryption

8. Author

Name: Mugeha

LinkedIn: https://www.linkedin.com/in/mugeha-jackline

Email: mugehajacky@gmail.com

9. 📄 License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors