-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|642|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
SoCoder -> Snippet Home -> Variables


 
Jayenkai
Created : 20 February 2008
 

Simple Checksum




 

Comments


Wednesday, 12 May 2010, 13:15
Longarm
I dont know if this is the same thing, but I prevented players from altering highscores by simply converting all data into a bank of bytes, XORing the whole thing with 255, and saving that...
Wednesday, 12 May 2010, 19:12
CodersRule
XOR isn't very good encryption, and if people really want to they will guess what it is.
Checksums are probably they way to go if they're encrypted well enough.
The difference between the two is basically,
With XOR, you encrypt the data. The data is then decrypted when the server processes it.
With checksums, you don't encrypt the data itself- you just send something so the server knows the data is real.

It really depends on which you need to use- but either way, I recommend not using XOR to encrypt, because someone will guess it.
Thursday, 13 May 2010, 01:38
JL235
CodersRule XOR isn't very good encryption, and if people really want to they will guess what it is.

Actually XOR is excellent for encryption and is used extensively in the cryptographic world. It's essentially modulo 2 maths. If you XOR a value with a truly random encryption key of the same length, it is described as being 'unconditionally secure' which essentially means it cannot be cracked. It's even possible to decrypt the data into multiple plaintext variations which all look like thesable results, but however are all wrong.

However he's not doing encryption, he's doing a checksum.