From 88221345d8d355123daf2f2b254e2a4bc5fd9ffa Mon Sep 17 00:00:00 2001 From: boxeyed Date: Sat, 12 Apr 2025 19:12:06 -0600 Subject: [PATCH 1/3] Added description to Caesar Cipher component --- src/gui/caesar_cipher_tool.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/gui/caesar_cipher_tool.py b/src/gui/caesar_cipher_tool.py index ddfcd4f..8210577 100644 --- a/src/gui/caesar_cipher_tool.py +++ b/src/gui/caesar_cipher_tool.py @@ -127,4 +127,21 @@ def cmds(): ) translate_button.pack(pady=(10, 30)) + explanation = tk.Label( + font=(PROGRAM_FONT, 14), + text="""This tool encodes/decodes text using the Caesar Cipher. + + The Caesar Cipher works by shifting every letter in a message down the + alphabet a certain number of times. + + This is one of the oldest encryption schemes, said to have been + utilized by and named after Julius Caesar! + + This cipher is not secure enough to be seriously implemented today + however, it holds great merit in introducing basic cryptography in education + due to its simplicity and effectiveness in demonstrating encryption/decryption. + """ + ) + explanation.pack(pady=(10, 30)) + return container From 8a64f138cb6228bc411997b9cb92639277921c99 Mon Sep 17 00:00:00 2001 From: boxeyed Date: Sat, 12 Apr 2025 19:48:59 -0600 Subject: [PATCH 2/3] added description --- src/gui/caesar_cipher_tool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/caesar_cipher_tool.py b/src/gui/caesar_cipher_tool.py index 8210577..77bbd14 100644 --- a/src/gui/caesar_cipher_tool.py +++ b/src/gui/caesar_cipher_tool.py @@ -142,6 +142,6 @@ def cmds(): due to its simplicity and effectiveness in demonstrating encryption/decryption. """ ) - explanation.pack(pady=(10, 30)) + explanation.pack() return container From 3afe72e83e6bd7e7271c81339341f01b318656db Mon Sep 17 00:00:00 2001 From: boxeyed Date: Sat, 12 Apr 2025 19:52:32 -0600 Subject: [PATCH 3/3] description added to comments --- src/gui/caesar_cipher_tool.py | 17 ----------------- src/logic/caesar_cipher_logic.py | 13 +++++++++++++ 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/src/gui/caesar_cipher_tool.py b/src/gui/caesar_cipher_tool.py index 77bbd14..ddfcd4f 100644 --- a/src/gui/caesar_cipher_tool.py +++ b/src/gui/caesar_cipher_tool.py @@ -127,21 +127,4 @@ def cmds(): ) translate_button.pack(pady=(10, 30)) - explanation = tk.Label( - font=(PROGRAM_FONT, 14), - text="""This tool encodes/decodes text using the Caesar Cipher. - - The Caesar Cipher works by shifting every letter in a message down the - alphabet a certain number of times. - - This is one of the oldest encryption schemes, said to have been - utilized by and named after Julius Caesar! - - This cipher is not secure enough to be seriously implemented today - however, it holds great merit in introducing basic cryptography in education - due to its simplicity and effectiveness in demonstrating encryption/decryption. - """ - ) - explanation.pack() - return container diff --git a/src/logic/caesar_cipher_logic.py b/src/logic/caesar_cipher_logic.py index 2bc7039..0e26953 100644 --- a/src/logic/caesar_cipher_logic.py +++ b/src/logic/caesar_cipher_logic.py @@ -1,5 +1,18 @@ import string +"""This tool encodes/decodes text using the Caesar Cipher. + + The Caesar Cipher works by shifting every letter in a message down the + alphabet a certain number of times. + + This is one of the oldest encryption schemes, said to have been + utilized by and named after Julius Caesar! + + This cipher is not secure enough to be seriously implemented today + however, it holds great merit in introducing basic cryptography in education + due to its simplicity and effectiveness in demonstrating encryption/decryption. """ + + def caesar_cipher(msg: string, shift: int, en_de: int) -> string: """Apply and return the encoded/decoded message"""