@@ -0,0 +1,1877 @@
+public class Vigenere %7B%0A%0A%09// http://www.asciitable.com/%0A%0A%09public static void main(String%5B%5D args) %7B%0A%09%09String key = %22gandalf%22;%0A%09%09String plainText = %22whatanunpredictableworldweliveright%22;%0A%0A%09%09String encryptedText = vigenereCipher(plainText, key);%0A%09%09String decriptedText = vigenereDecipher(encryptedText, key);%0A%09%09System.out.println(decrypt(encryptedText, key));%0A%0A%09%09System.out.println(encryptedText);%0A%09%09System.out.println(decriptedText);%0A%09%09System.out.println((-2) %25 26);%0A%0A%09%7D%0A%0A%09public static String vigenereCipher(String plainText, String key) %7B%0A%09%09String cipherText = %22%22;%0A%09%09plainText.toLowerCase();%0A%09%09plainText.trim();%0A%09%09key.toLowerCase();%0A%09%09for (int i = 0; i %3C plainText.length(); i++) %7B%0A%09%09%09char letter = (char) (((int) plainText.charAt(i) - (int) 'a'%0A%09%09%09%09%09+ (int) key.charAt(i %25 key.length()) - (int) 'a') %25 26 + (int) 'A');%0A%09%09%09cipherText = cipherText + letter;%0A%09%09%7D%0A%09%09return cipherText;%0A%09%7D%0A%0A%09public static String vigenereDecipher(String cipherText, String key) %7B%0A%0A%09%09String plainText = %22%22;%0A%09%09String plaint = %22%22;%0A%09%09cipherText.toUpperCase();%0A%09%09key.toLowerCase();%0A%0A%09%09for (int i = 0; i %3C cipherText.length(); i++) %7B%0A%09%09%09int cipherAt = (int) cipherText.charAt(i) - (int) 'A';%0A%09%09%09int keyAt = (int) key.charAt(i %25 key.length()) - (int) 'a';%0A%09%09%09int resultKey = (cipherAt - keyAt);%0A%0A%09%09%09System.out.println(resultKey);%0A%0A%09%09%09if (resultKey %3C 0) %7B%0A%09%09%09%09resultKey = resultKey + 26;%0A%09%09%09%09System.out.println(resultKey);%0A%09%09%09%7D%0A%0A%09%09%09resultKey = (int)resultKey %25 26 + (int) 'a';%0A%09%09%09plainText = plainText + (char) resultKey;%0A%0A%09%09%7D%0A%09%09return plainText;%0A%09%7D%0A%0A%09static String decrypt(String text, final String key) %7B%0A    String res = %22%22;%0A    text = text.toUpperCase();%0A    for (int i = 0, j = 0; i %3C text.length(); i++) %7B%0A        char c = text.charAt(i);%0A        if (c %3C 'A' %7C%7C c %3E 'Z') continue;%0A        res += (char)((c - key.charAt(j) + 26) %25 26 + 'A');%0A        j = ++j %25 key.length();%0A    %7D%0A    return res;%0A  %7D%0A%7D%0A

Add vigenere algo