Posted by Epitaph64 on Mon 15 Jun 23:13 (modification of post by Epitaph64 view diff)
report abuse | download | new post
- /*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
- package encrypttext;
- /**
- *
- * @author Walter
- */
- public class Main {
- /**
- * @param args the command line arguments
- */
- String inputString = "So, I'm pretty bored now, how about you?";
- String outputString = "";
- String originalString = "";
- byte encryptionArray[] = new byte[128];
- for (int i = 0; i < 128; i++)
- {
- }
- for (int i = 0; i < inputString.length(); i++)
- {
- char x = inputString.charAt(i);
- x ^= encryptionArray[i%128];
- outputString += x;
- }
- for (int i = 0; i < outputString.length(); i++)
- {
- char x = outputString.charAt(i);
- x ^= encryptionArray[i%128];
- originalString += x;
- }
- String key = "";
- for (int i = 0; i < 128; i++)
- {
- key += encryptionArray[i] + " ";
- }
- }
- }
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.