Fuzzu Audio Encryptor – Secure Your Voice with Python GUI App ππ΅
Demo :
Click Video πππ
π Features:
-
Encrypt any audio file to secure
.fuzzu
format -
Decrypt back with one click using saved Fernet key
-
Built with Python,
customtkinter
, andcryptography
-
Offline tool – no internet needed
-
Beginner-friendly code for developers
Code :
import customtkinter as ctk
from tkinter import filedialog, messagebox
from cryptography.fernet import Fernet
import os
# App Appearance
ctk.set_appearance_mode("dark")
ctk.set_default_color_theme("blue")
class AudioEncryptorApp(ctk.CTk):
def __init__(self):
super().__init__()
self.title("Fuzzu Audio Encrypt/Decrypt Tool")
self.geometry("600x500")
self.resizable(False, False)
self.key = Fernet.generate_key()
self.cipher = Fernet(self.key)
self.build_gui()
def build_gui(self):
ctk.CTkLabel(self, text="Audio Encryptor & Decryptor", font=("Arial", 24, "bold")).pack(pady=20)
ctk.CTkButton(self, text="π Encrypt Audio", command=self.encrypt_audio).pack(pady=10)
ctk.CTkButton(self, text="π Decrypt Audio", command=self.decrypt_audio).pack(pady=10)
ctk.CTkButton(self, text="πΎ Save Key", command=self.save_key).pack(pady=10)
self.status = ctk.CTkLabel(self, text="Status: Ready", text_color="gray")
self.status.pack(pady=30)
def encrypt_audio(self):
path = filedialog.askopenfilename(title="Select Audio File", filetypes=[("Audio Files", "*.mp3 *.wav *.aac *.ogg *.flac")])
if path:
try:
with open(path, "rb") as f:
data = f.read()
encrypted = self.cipher.encrypt(data)
save_path = path + ".fuzzu"
with open(save_path, "wb") as f:
f.write(encrypted)
self.status.configure(text=f"Encrypted: {os.path.basename(save_path)}")
except Exception as e:
messagebox.showerror("Error", str(e))
self.status.configure(text="Encryption Failed")
def decrypt_audio(self):
path = filedialog.askopenfilename(title="Select Encrypted File", filetypes=[("Encrypted Audio", "*.fuzzu")])
if path:
try:
with open(path, "rb") as f:
encrypted_data = f.read()
decrypted = self.cipher.decrypt(encrypted_data)
save_path = path.replace(".fuzzu", "_decrypted.mp3")
with open(save_path, "wb") as f:
f.write(decrypted)
self.status.configure(text=f"Decrypted: {os.path.basename(save_path)}")
except Exception as e:
messagebox.showerror("Error", "Invalid File or Key")
self.status.configure(text="Decryption Failed")
def save_key(self):
path = filedialog.asksaveasfilename(defaultextension=".key", filetypes=[("Key File", "*.key")])
if path:
with open(path, "wb") as f:
f.write(self.key)
self.status.configure(text=f"Key Saved: {os.path.basename(path)}")
if __name__ == "__main__":
app = AudioEncryptorApp()
app.mainloop()
Comments
Post a Comment