storing data not in xml nor database

  • Thread starter Thread starter Casper F.
  • Start date Start date
C

Casper F.

Hi all,

I was wondering what other possibilities I have to save data.

I know I can store data into a database and into clear readable files
i.e. XML. However I would like to save my data into a file, which the
user can no "easily" read or better said access. What options do I
have? Is binary output the only way to go? Does anyone have a link to
a code snippet or tut? Main goal is to make the reading of the file
most difficult.

Thanks!

Casper
 
Casper,

You could use a binary file, but you have the delightful duty of
figuring out the binary format. An easy solution would be to serialize your
data objects to the file.

Just remember that if you do this, you will have to
serialize/unserialize the entire set as an all-or-nothing operation. Unless
you create a custom binary format (more trouble than it is worth), you
aren't going to have much in the way of query ability (not that the XML
solution is better, in terms of querying, since you have to load the whole
document anyways).
 
I know I can store data into a database and into clear readable files
i.e. XML. However I would like to save my data into a file, which the
user can no "easily" read or better said access. What options do I
have? Is binary output the only way to go? Does anyone have a link to
a code snippet or tut? Main goal is to make the reading of the file
most difficult.

Maybe you could use a package file. Check this link:

http://msdn.microsoft.com/msdnmag/issues/07/08/OPC/

Chris
 
Hi,

Casper F. said:
Hi all,

I was wondering what other possibilities I have to save data.

I know I can store data into a database and into clear readable files
i.e. XML. However I would like to save my data into a file, which the
user can no "easily" read or better said access. What options do I
have? Is binary output the only way to go? Does anyone have a link to
a code snippet or tut? Main goal is to make the reading of the file
most difficult.

You can always save it in a Text file and then zip it, IIRC you can
serialize your dataset to a memorystream and then zip this stream to a file,
in this way you never have a text file in disk, just the zipped file
 
But, the zip file is easily opened.
If security is important, you can use CryptoStream Class.
Roger
 
Casper said:
I know I can store data into a database and into clear readable files
i.e. XML. However I would like to save my data into a file, which the
user can no "easily" read or better said access. What options do I
have? Is binary output the only way to go? Does anyone have a link to
a code snippet or tut? Main goal is to make the reading of the file
most difficult.

I would go for XML or database and store the sensitive data encrypted.

The binary solutions can create a lot of problems and are not really
secure anyway.

Arne
 
You could write the xml in memory and then using the cryptology namespace
encrypt the whole thing. Take the Encrypted memory stream write to a text
file. I would have the Vector and key stored in the App.Config/Web.Config
file as an app key/value. Then to use the file, Decrypt the file and read
the the xml.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top