Creating protected files filled with data
Hello, I am making a game and I want to store highscores inside a file.
How do I make this data protected so no one could edit anything.
For now, I encrypted the score and put it into file and when loading it I can decrypt it. All these encrypted strings are inside file "scores.txt".
Is it possible to create a file with custom extension that no one could open ?
:confused:
Creating custom file extensions
Hello,
I made a game and I store my scores in text file, but before that I encrypt them... later I can decrypt them.
How can I create a custom file that no one will be able to open it except for me ?
e.g File "scores.myext" that will contain my scores.
Re: Creating protected files filled with data
Re: Creating protected files filled with data
Any reason not to use the registry?
Re: Creating protected files filled with data
Quote:
How can I create a custom file that no one will be able to open it except for me
The computer administrator account can always obtain sufficient privileges and permissions to be able to open and read (and modify) the content of any file on the system. However, there are what is called alternate data streams that can be associated with a file, the contents of which don't show if you just use the normal ways to view a file. These alternate data streams of a file are given names and you need to know both the file name and the stream name to be able to access this alternate data. There are only a few standard programs that work properly with these alternate streams. See https://msdn.microsoft.com/en-us/lib...(v=vs.85).aspx
Re: Creating protected files filled with data
Just serialize your data in a file with custom extension, and only your application could de-serialize your data ... there is a lot of examples on internet that show you how to serialize integers, strings, etc.