Reply
Thu 20 Mar, 2014 04:20 pm
I want to make a program in JavaScript that takes a prompt message and encrypts it. I want each letter to have multiple values, for example a random number would be generated 1-3. If it was 1, "a" would equal "xxx". If it was 2, "a" would equal "zzz". If it was 3, "a" would equal "yyy". So if the prompt message was "aaa", you might get something like this: "xxxzzzyyy". Of course with randomness it could also look like: "zzzyyyxxx". Decryption would be simple, you would just replace each value with the correct letter, the encryption is the hard part with the changing values. Is there any way to do this?