Showing posts with label Encryption. Show all posts
Showing posts with label Encryption. Show all posts

Thursday, December 29, 2011

Quick way to encrypt your objects in Java

Hi, hope you have a good Christmas :) Mine was not bad, but here I am to write a little more.
Besides eating chocolates, these days I have continued some of my school works. One in specific is a game for android, that soon I will talk more in detail.
 
One important thing in games is the possibility of save the scores in a way that no one can forge, at least directly. So how do this in Java?

The simplest idea that I remembered was to put the scores in a particular class, make it serializable, apply a xor and write it to a file, to recover do the reverse process.