This project is a simple application built using Python and Tkinter for encrypting and decrypting secret messages. The application allows users to save their secrets securely with encryption and decrypt them when needed.
- Encrypt secret messages with a master key.
- Save encrypted messages to a file.
- Decrypt messages using the master key.
- Simple and user-friendly GUI.
Ensure you have Python installed on your machine. This project was developed with Python 3.8.
-
Clone the repository:
git clone https://github.com/YusufCelebii/SecretNotes cd secrets-manager -
Install required packages (Tkinter is usually included with Python):
pip install tkinter
- Navigate to the project directory.
- Run the
main.pyfile:python main.py
- Enter your title: Provide a title for your secret.
- Enter your secrets: Type your secret message.
- Enter your master key: Provide a master key for encryption.
- Encrypt & Save: Click this button to encrypt and save your message.
- Decrypt: To decrypt a message, paste the encrypted text into the text area, provide the master key, and click this button.
The GUI consists of the following components:
- Title Entry (
title1): A text entry field where you enter the title for your secret. - Secrets Textbox (
text1): A text box where you enter the secret message that you want to encrypt or decrypt. - Master Key Entry (
master_key): A text entry field where you enter the master key used for encryption and decryption. - Encrypt & Save Button (
save_button): A button that, when clicked, encrypts the entered secret using the master key and saves it to the fileMy Secrets.txt. - Decrypt Button (
decrypte_button): A button that, when clicked, decrypts the entered encrypted message using the master key and displays the decrypted message in the secrets textbox.
main.py: The main script containing the application code.My Secrets.txt: The file where encrypted secrets are stored.
The application uses the Tkinter library to create a GUI and the base64 module for encoding and decoding the messages.
def encode(key, clear):
enc = []
for i in range(len(clear)):
key_c = key[i % len(key)]
enc_c = chr((ord(clear[i]) + ord(key_c)) % 256)
enc.append(enc_c)
return base64.urlsafe_b64encode("".join(enc).encode()).decode()