Caesar Cipher in Java
Credit goes to Musa Mohammed for his help. import java.util.Scanner; public class CaesarCipher { public static final String ALPHABET = "abcdefghijklmnopqrstuvwxyz"; public static String encrypt(String plain_Text,int shiftKey) { plain_Text = plain_Text.toLowerCase(); String cipherText=""; for(int i=0;i<plain_Text.length();) { if(plain_Text.charAt(i) == ' ') { cipherText += plain_Text.charAt(i); i++; } else { int charPosition = ALPHABET.indexOf(plain_Text.charAt(i)); int keyVal = (shiftKey+charPosition)%26; char replaceVal = ALPHABET.charAt(keyVal); cipherText += replaceVal; i++; } } return cipherText; } public static String decrypt(String cipherText, int shiftKey) { cipherText = cipherT...