diff --git a/Cipher.java b/Cipher.java index 7527c5b..a9c5424 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++) { - + char encryptedChar = replaceChar(inputString.charAt(i),true); + outputString = outputString + encryptedChar; } return outputString; @@ -26,7 +27,10 @@ public String decrypt(String inputString) { // output string will be collected in this variable, one char at a time String outputString = ""; - replaceChar('a',true); + for(int i = 0;i