vbtester
05-13-2003, 02:18 PM
I am using Visual Basic 6. I would like a secure way of saving my object data to a file, so it can be reloaded when the program is re-loaded. The ideal way for me to secure my file data would be if I am able to serialize the objects contents to a file. However I have noticed that VB6 does not support serialization while VB.NET does. So I guess my question is two fold.
1) Is a file secure if it is written as a binary file? Or can some one just open and read the binary file if they have VB6 installed on their machine? If this is not the case, or there is some way to write a secure binary file, how do I go about doing it? I know already how to write an ASCII file, but how do I read and write a secure binary file?
2) Is there a way for me to implement my own serialization? If so how would I go about doing it? I noticed a few other posts that suggested using XML, however XML is stored in plain text and anyone would be able to read and access the data.
Since serialization makes an objects data un-readable when it is dumped to a file, this would be perfectly secure for me, the reason for this is, in order to un-serialize that file you would have to have your data structure set up in the exact same format as it was before serialization. For this reason I can be relatively sure that no one would be able to read the serialized file because only I know what format the data structure was in before serialization.
I am wondering if this approach is also possible using a binary file of some sort.
Any input is greatly appreciated; I look forward to your replies.
1) Is a file secure if it is written as a binary file? Or can some one just open and read the binary file if they have VB6 installed on their machine? If this is not the case, or there is some way to write a secure binary file, how do I go about doing it? I know already how to write an ASCII file, but how do I read and write a secure binary file?
2) Is there a way for me to implement my own serialization? If so how would I go about doing it? I noticed a few other posts that suggested using XML, however XML is stored in plain text and anyone would be able to read and access the data.
Since serialization makes an objects data un-readable when it is dumped to a file, this would be perfectly secure for me, the reason for this is, in order to un-serialize that file you would have to have your data structure set up in the exact same format as it was before serialization. For this reason I can be relatively sure that no one would be able to read the serialized file because only I know what format the data structure was in before serialization.
I am wondering if this approach is also possible using a binary file of some sort.
Any input is greatly appreciated; I look forward to your replies.