//Cipher Creator v.1.4 //Joshua Browning //Last update on 8/6/07 //Scrambles the alphabet to code a message import java.util.*; public class Cipher_Creator { public static void main (String args[]) { String [] alphabet = {"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"}; String [] key = {"","","","","","","","","","","","","","","","","","","","","","","","","",""}; boolean [] used = {false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false}; String message; String keystring; Scanner s = new Scanner(System.in).useDelimiter("\n\n"); Scanner responseGetter = new Scanner(System.in); int random = (int)(Math.random() * 26); System.out.println("Enter the message you wish to cipher, then press enter twice:"); message = s.next(); message = message.toLowerCase(); String cipher = message; for (int j=0; j<26; j++) { while (used[random]) { random = (int)(Math.random() * 26); } key[random] = alphabet[j]; used[random] = true; } for (int j=0; j<26; j++) { key[j] = key[j].toUpperCase(); } for (int j=0; j