Can I decrypt some file into memory and then use it as a regular file without using harddisk?
More exactly, I want to decrypt a .mdb file with some sensitive data and operate with it like loaded from disk but without using temporary files. I figured that maybe i could do a File object or stream (still have to figure the code) from the decrypted byte array, but then, a problem is that the OleDbConnection loads data from a string containing file name.
Lets try to example this:
byte[] someArrayWithTheContentsOfAdotMDBFile = getDecryptedFile();
[...]
// Even if I get to wrap the array into a File or Stream, the load process requires a filename
using (OleDbConnection connection = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=.\"+ fileNameHere)) // can fileNameHere be a File object, stream or any trick like that??
edit: As the answers took the thread that way, I changed title to "loading database...". I'm still interested in loading any file type from memory, but lets leave that for another thread