getemerson Posted March 1, 2003 Posted March 1, 2003 Fellow programmers - your challenge. Overview: Im using file io class to read a file, decrypt it, create a decrypted copy back to hard drive before launching the decrypted copy in realplayer. This all works just peachy but ... Problem: The decrypted copy is now in view and obviously vunerable outside of the application for all to view and copy. What I need: Im guessing that i can somehow use one of the io.stream classes to copy the file into memory so I dont have to create a copy on the hard drive. Is this at all possible??? I hope this makes sense - I dont as yet have sample code to do this - Any suggestion/code will be greatly appreciated. Mark Quote
*Gurus* divil Posted March 2, 2003 *Gurus* Posted March 2, 2003 You can probably keep a copy in memory using the MemoryStream class, but it's not meant to be a file. You can't access it like a file, and I'm pretty sure it's readonly too. There wouldn't be a way for RealPlayer to access it even if it _was_ meant to be an in-memory file. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
getemerson Posted March 2, 2003 Author Posted March 2, 2003 Memory Stream - Encryption - Decryption Thank you for your response. :D I suppose the burning question is then ... Is there any other vb.net solution that will enable me to hide and work with a decrypted file within the application. What about using assemblies and resourse files to wrap the files ? - This is quite a new area for me so I havnt explored these options - yet! Bear in mind that the user will probably have admin rights on their PC so I cant use windows authentication based on their profile. Im currently using the diagnostic class to launch the .ram extesnion file (realplayer) in this case. This all works fine as previously mentioned. You can see my problem - the copy created on the hard drive using the stream class is now decrypted/vunerable and in full view for the user to find and copy. Undesirable. Ive thought of using the Windows Media Rights Manager SDKs - This would actually solve most of my issues. But at the moment we are looking at an in-house applicatoin. Thank you in advance for any pointers on this. Mark :D Quote
*Gurus* divil Posted March 2, 2003 *Gurus* Posted March 2, 2003 I honestly can't see a way of doing what you want. You're restricted to using whatever RealPlayer can open, which presumably is just a file. You could always give the file a Hidden attribute I suppose. Just a thought, if RealPlayer can open URLs, you might be able to create a dummy webserver to serve your decrypted stream and have RealPlayer connect to that. A little far fetched, but then, so is your requirement :) Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.