Beginner with encryption/publishing problems

NJCI

Member
Joined
May 9, 2011
Messages
8
Programming Experience
Beginner
I am a co-op student in my fourth term working as a vb programmer. I've had 3 VB classes and I'm doing my best. Right now I am writing a Windows Form program that reads several XML files from a folder inside bin\debug. It is working in debug, (so far).

The end result of this will be that our people will install this program on their laptop and then show it to potential customers. So they need to install the XML files with the program, then be able to check for updates when they are connected to the internet. The "users" do not need to make changes. An administrator will have access to the XML files, update them and then upload them to where the users check for updates.

What would be the simplest way to encrypt the XML files so that no one can open and read them except for the administrator? The program needs to decrypt the files in order to read them, but that is all.

I have searched and searched, and so far I am using this example.

But I'm a beginner and I'm not sure what this is actually doing (other than turning the text of the filenames green in the folder). It doesn't have to be super secure, just enough that an average person couldn't look at the XML and read it.

Also, as I said, it is working fine in Debug. However, when I publish it, the XML files do not load (one is supposed to be read and populate a combobox on Form_Load). Have I not actually included the files in the program?

Thanks for any help
 
Okay.. Firstly, i'll begin with the XML file read issues. If I were you, I'd just run the program so that the first time it loads it'll check if it
has the appropriate files. if it doesn't, then set it to download using the, and im not sure if this is word for word perfect, but the
Me.Computer.Network.Downloadfile(URL) Method. This really only takes a few miliseconds unless they're freaking huge, then we'll have to brainstorm another idea, but if I were you, every time the program loads it should just delete the old XML files and add the new ones.
Unless they're huge. then yeah, we'll think of something x)

As for the encryption, the method is up to you. There are lots of methods, and using the file.encrypt method would stop the average
joe from reading them, but if this gets big, and i like to think that's always a possibility, you'll be a target for more seasoned hackers, and VB's native encryption scheme is far from secure. I think at the moment, focus on getting it working with the XML file problem. When you're done with that, throw a post out on here so I get an e-mail and then we can focus on the security. One thing at a time :)
 
Back
Top