Click here to Skip to main content
15,890,123 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I’m looking for the best solution for the following problem:

I’m writing a commercial .net-Application that manages and displays big amounts of confidential Data (Text, Images, Pdf´s, Sound files and Videos).
I want to put this data in several big “files”, which can be switched or “loaded” by the Application. However, those files must be secure in some way and the access to the files must be reasonable fast.

Here is what I currently do:

I crate a Package (System.IO.Packaging) and stream all necessary Data into it. During the Streaming, I switch the first 1024 Bytes of every Data in a certain way, so the contents of the Package are basically encrypted. Finally I give the Package a funny name (e.g. “file1.test, file2.test,…”) an thus I have the “file” that I described earlier.

Now, if my Application loads such a file, I just stream the necessary Data out of it whenever it is needed. During the streaming I apply the inverse of the encryption that I used earlier, so the Date (e.g. an Image) can be properly read and displayed.

But, if I want to display bigger Data in my application (e.g. play a Video), than I first have to stream it into an ordinary (but well hidden) file because of two reasons:

-I cannot fit the whole thing into working memory, like I do with Text or Images.
-I use third Party Software (mostly dll´s) to display/play Videos-, Sound- or PDF-files. Unfortunately those third Party Software often needs to get the Data as an ordinary file (e.g. videoXY.wmv) in order to play it.

This approach is mostly safe (except for big files, that have to be extracted an well-hidden) and relatively fast (except for big files, again).
I put emphasis on speed, because the application has to work on Tablet-PC´s an there it is to be run from an SD-Card (not my decision).

It would be great if someone knew a better (safer, faster) way to do this.

Thanks in advance.

What I have tried:

Here is what I currently do:

I crate a Package (System.IO.Packaging) and stream all necessary Data into it. During the Streaming, I switch the first 1024 Bytes of every Data in a certain way, so the contents of the Package are basically encrypted. Finally I give the Package a funny name (e.g. “file1.test, file2.test,…”) an thus I have the “file” that I described earlier.

Now, if my Application loads such a file, I just stream the necessary Data out of it whenever it is needed. During the streaming I apply the inverse of the encryption that I used earlier, so the Date (e.g. an Image) can be properly read and displayed.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900