Releases: emrenos/encrypt-decrypt
Releases · emrenos/encrypt-decrypt
Caesar Cipher Project Update Summary
Changes from Initial Version to Updated Version 🔧
Shift from Console-Based to GUI-Based Application:
- The updated code uses the tkinter library to create a graphical user interface (GUI) for the Caesar Cipher application. The original console-based interaction, with input prompts and print statements, is replaced by GUI components like tk.Entry, tk.Label, and tk.Button.
GUI Components:
- Window Setup: Created a main application window with a fixed size, custom title, and an icon.
- Logo Display: Added a label to display the application logo.
- Text Input: Added text entry fields for user input message and shift number.
- Result Display: Added a text widget to display the encoded or decoded result.
- Buttons: Added 'ENCRYPT' and 'DECRYPT' buttons for user actions.
Import Changes:
- Added tkinter and PIL (Python Imaging Library) imports for creating and managing the GUI.
- Included Image and ImageTk from PIL to handle the application icon.
Alphabet Extension Functionality:
- The function extend_alphabet is retained but simplified by removing the set last_letters and directly checking for letters within the set.
Encryption and Decryption Functions:
- Enhanced encryption and decryption logic to handle wrap-around using modulo operator %.
- Functions now return the result instead of printing directly, which integrates better with the GUI update functions.
Event Handling:
- Added functions on_encrypt and on_decrypt to handle button clicks, performing the encryption or decryption and updating the result display. Introduced update_result_text function to update the result display widget in the GUI.
📌 Summary
The new version significantly enhances user interaction by providing a graphical interface, improving usability and accessibility.