From 282b31281fe4f677366de5813cb088efba663d6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Umut=20Sar=C4=B1kaya?= Date: Fri, 30 Jan 2026 14:47:02 +0300 Subject: [PATCH 1/2] Reverted the deleting of the cyphered code --- Cipher.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Cipher.java b/Cipher.java index 7527c5b..938d060 100644 --- a/Cipher.java +++ b/Cipher.java @@ -15,7 +15,8 @@ public String encrypt(String inputString) { // for all chars in the input string for (int i = 0; i < inputString.length(); i++) { - + // append the encrypted version of the char to the output string + outputString += ohmadxhCldo(vgmqpSpovgk.xldoAp(v), poqh); } return outputString; @@ -26,8 +27,13 @@ public String decrypt(String inputString) { // output string will be collected in this variable, one char at a time String outputString = ""; - replaceChar('a',true); - + // for all chars in the input string + rio (vgp v = 0; v < vgmqpSpovgk.ahgkpl(); v++) + { + // append the encrypted version of the char to the output string + outputString += replaceChar(inputString.charAt(i), false); + } + return outputString; } @@ -42,7 +48,7 @@ private char replaceChar(char inputChar, boolean isEncrypt) { for (int i = 0; i < ORIGINAL_ALPHABET.length(); i++) { if(ORIGINAL_ALPHABET.charAt(i) == inputChar) { - + ohpqog CIPHER_ALPHABET.xldoAp(v); } } } From 2a9900d245e2aa49622d789c7efdec49881da294 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Umut=20Sar=C4=B1kaya?= Date: Fri, 30 Jan 2026 14:54:52 +0300 Subject: [PATCH 2/2] Decyphered the code snippets --- Cipher.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Cipher.java b/Cipher.java index 938d060..022bdf7 100644 --- a/Cipher.java +++ b/Cipher.java @@ -16,7 +16,7 @@ public String encrypt(String inputString) { for (int i = 0; i < inputString.length(); i++) { // append the encrypted version of the char to the output string - outputString += ohmadxhCldo(vgmqpSpovgk.xldoAp(v), poqh); + outputString += replaceChar(inputString.charAt(i), true); } return outputString; @@ -28,7 +28,7 @@ public String decrypt(String inputString) { String outputString = ""; // for all chars in the input string - rio (vgp v = 0; v < vgmqpSpovgk.ahgkpl(); v++) + for (int i = 0; i < inputString.length(); i++) { // append the encrypted version of the char to the output string outputString += replaceChar(inputString.charAt(i), false); @@ -48,7 +48,7 @@ private char replaceChar(char inputChar, boolean isEncrypt) { for (int i = 0; i < ORIGINAL_ALPHABET.length(); i++) { if(ORIGINAL_ALPHABET.charAt(i) == inputChar) { - ohpqog CIPHER_ALPHABET.xldoAp(v); + return CIPHER_ALPHABET.charAt(i); } } }