diff --git a/Cipher.java b/Cipher.java index 7527c5b..0bab0fb 100644 --- a/Cipher.java +++ b/Cipher.java @@ -15,7 +15,12 @@ public String encrypt(String inputString) { // for all chars in the input string for (int i = 0; i < inputString.length(); i++) { +<<<<<<< HEAD + // append the encrypted version of the char to the output string + outputString += replaceChar(inputString.charAt(i), true); +======= +>>>>>>> origin/main } return outputString; @@ -26,8 +31,18 @@ public String decrypt(String inputString) { // output string will be collected in this variable, one char at a time String outputString = ""; +<<<<<<< HEAD + // for all chars in the input string + for (int v = 0; v < inputString.length(); v++) + { + // append the encrypted version of the char to the output string + outputString += replaceChar(inputString.charAt(v), false); + } + +======= replaceChar('a',true); +>>>>>>> origin/main return outputString; } @@ -42,7 +57,11 @@ private char replaceChar(char inputChar, boolean isEncrypt) { for (int i = 0; i < ORIGINAL_ALPHABET.length(); i++) { if(ORIGINAL_ALPHABET.charAt(i) == inputChar) { +<<<<<<< HEAD + return CIPHER_ALPHABET.charAt(i); +======= +>>>>>>> origin/main } } }