ID:265707
 
I have came up with another simple formula, that allows 65535 possible combinations to decrypt it, while not bloating the string 1 bit.

proc
Encrypt(string,key,inc)
ASSERT(isnum(key) && isnum(inc))
for(var/i = 1 to length(string))
var/char = text2ascii(string,i))
key += inc
while(key > 255)
key -= 255
char ^= key
. += char

So it allows 255 possible keys that can be incremented bh 255 different values allowing 65535 combinations. I think this is pretty good since it doesent increase the length of the string and is pretty difficult to crack.
No, not really. I reckon that if you gave me a day and a decently-sized ciphertext, I could break that. And I'm not much for cryptography.

EDIT: Not to mention that you could probably brute-force it in Not Much Time.

(Also, you can use % instead of the if(>=) -=255 thing.)
Yeah, that would actually be really easy to brute-force.