I'm not sure if anyone has done this before, but I was rather bored so I made a XOR Encryption function with my own additions to get rid of the parts of the ASCII character set that aren't really shown in Graal.
PHP Code:
/*Paramters:
s - string to be encrypted
usechars - boolean determining whether or not it changes ascii values into characters.
key - Encryption key. (Optional) If left NULL it replaces with the default. s must be shorter or the same length as the encryption key.
*/
public function XOREncrypt(s, usechars, key) {
if (key == NULL)
key = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
temp.replace = "-";
if (s.length() <= key.length()) {
temp.out = "";
for (i=0; i<s.length(); i++) {
temp.a = getascii(s.charat(i)) xor getascii(key.charat(i));
if (usechars) {
if (temp.a > 32 && temp.a != 127) {
temp.a = char(temp.a);
if (temp.a = " ")
temp.a = temp.replace;
}
else temp.a = temp.replace;
}
temp.out @= temp.a;
}
return temp.out;
}
else
return "String too long. (Limit " @ key.length() @ ")";
}
Example:
PHP Code:
XOREncrypt("A nice cat", true, NULL);
Which will return "-b--&#g+(>"
From what I hear, this method is hard, if not impossible to decrypt, and it's rather simple.