How to write data in file in “unreadable” form?
Hello) I have to play (loudly) we need to make save/load) to Keep the data going in the file and read from it, respectively. How to write data in the file so that the user could not read the content (kvazary any), and the program when reading from this file would get the correct (=right obosnovanie) data? If you know another way to organize the save/load please write and razyasnit)
XOR on the string, and the string to pass or at the end or at the beginning, just to realize and solve not so simply as if you just XOR In each case, the string will be different which further complicates the reverse decryption to the attacker. Only the length of the string and its location will be identical and known to the author.
Answered: 24-12-2012 в 00:48:49
This is not the case where you need real encryption (usually in games it is), so the most appropriate option would be a simple and fast XOR-encryption.
Answered: 23-12-2012 в 20:55:31
And what's the problem? Just don't read people, can be in binary form to record. Can serialization be used ( by the way, and will Parmelee, for persistence ), can apply encoding functions and decoding, to write their own, a lot of options!
Answered: 23-12-2012 в 15:22:07
The answer is simple. To use encryption. For example, key. I personally like the AES algorithm. Here is an example of encryption:
Taken from here https://stackoverflow.com/questions/992019/java-256-bit-aes-password-based-encryption
Answered: 23-12-2012 в 15:21:11
A common problem: the key where to stick it? - 23-12-2012 в 18:57:17
@Barmaley, in resources, if not essential, in the registry. all that is on your computer, you fundamentally intercept decrypted before use. can critical data for authorization logic and saves to be stored on the server. - 23-12-2012 в 20:36:58