"1-Click File Encryption: Secure Your Files Instantly | Python GUI Project"
Demo :
Click Video πππ
π Protect your files with just 1 click using this powerful Python GUI Encryption Tool! Learn how to encrypt and decrypt files effortlessly using Python. Perfect for Cyber Security enthusiasts, ethical hackers, and tech lovers. Download full source code now! π
1️⃣ Introduction
-
What is File Encryption?
-
Why is it important for Cyber Security?
-
How this Python GUI Tool makes encryption super easy?
2️⃣ Features of This Python GUI Encryption Tool π₯
✅ One-click encryption & decryption
✅ Simple & easy-to-use GUI
✅ Secure file protection with custom keys
✅ Fast & lightweight
3️⃣ Full Source Code (Step-by-Step Implementation) π
-
Provide the full Python GUI encryption code
-
Explain each section for easy understanding
-
Add screenshots of the GUI
4️⃣ How to Use? (Step-by-Step Guide) π¨π»
-
Download the Python project
-
Run the GUI
-
Select the file
-
Enter an encryption key
-
Click Encrypt or Decrypt
-
Done! Your file is now secure π₯
5️⃣ Download & Source Code π
Code :
import tkinter as tk
from tkinter import filedialog, messagebox
import os
# Encryption & Decryption Function
def encrypt_decrypt(filename, key):
try:
with open(filename, 'rb') as file:
data = file.read()
encrypted_data = bytearray(data)
for i in range(len(encrypted_data)):
encrypted_data[i] ^= ord(key)
with open(filename, 'wb') as file:
file.write(encrypted_data)
messagebox.showinfo("Success", "Operation Completed Successfully!")
except FileNotFoundError:
messagebox.showerror("Error", "File not found!")
# Browse File Function
def browse_file():
file_path = filedialog.askopenfilename()
file_entry.delete(0, tk.END)
file_entry.insert(0, file_path)
# Start Encryption/Decryption
def start_process():
filename = file_entry.get().strip()
key = key_entry.get().strip()
if not filename or not key:
messagebox.showerror("Error", "Please enter both File and Key!")
return
if len(key) != 1:
messagebox.showerror("Error", "Key must be a single character!")
return
encrypt_decrypt(filename, key)
# GUI Setup
root = tk.Tk()
root.title("File Encryptor & Decryptor")
root.geometry("450x300")
root.configure(bg="#222222")
# Title Label
title_label = tk.Label(root, text="File Encryption & Decryption", font=("Arial", 16, "bold"), fg="white", bg="#222222")
title_label.pack(pady=10)
# File Selection
tk.Label(root, text="Select File:", font=("Arial", 12), fg="white", bg="#222222").pack(pady=5)
file_entry = tk.Entry(root, width=40)
file_entry.pack(pady=5)
browse_button = tk.Button(root, text="Browse", command=browse_file, bg="#4CAF50", fg="white", font=("Arial", 10, "bold"))
browse_button.pack(pady=5)
# Key Entry
tk.Label(root, text="Enter Key (1 Char):", font=("Arial", 12), fg="white", bg="#222222").pack(pady=5)
key_entry = tk.Entry(root, width=10, show="*")
key_entry.pack(pady=5)
# Encrypt/Decrypt Button
process_button = tk.Button(root, text="Start Encryption/Decryption", command=start_process, bg="#FF5733", fg="white", font=("Arial", 12, "bold"))
process_button.pack(pady=10)
# Run GUI
root.mainloop()
πΉ If you found this project useful, subscribe to our YouTube channel!
πΉ Comment & share if you need more Python projects!
Comments
Post a Comment