Do not use on any
shared computer
August 29, 2008 10:06pm pdt
 
[x]
Attachment Details

Creating a second XML file from one, with encryption...little help.

Tags: VB.NET, XML
I'm currently creating an application that will run batch and or windows programs/commands, it is XML driven.  The main point is to remove any/all need to have plain txt BAT and CMD files that users can get into. Once the XML command file is created it can be tested unencrypted, but the main idea is to then create a second XML file that has specific nodes encrypted. In the XML I'd like to encrypt the values of the 'path' and 'opts' nodes,

I have no idea how to essentually make a copy of one XML file, while only encrypting 2 values of each command record. I'm not new to VB, but I haven't had any real time to stop and learn all about XML yet.

 I've included my XML file as a snippet. I already have a very good encryption/decryption routine and know I need to call something along the lines of so (at the right moment)

encrypt (node.value) And I'm using Xpath to read-in the XML and select just the desired XML record, but again, due to my lack of XML expertise, this was given to me as well, and I made some modifications to make it fit my need.

I envision performing something like:
cmdrunner -encrypt -i myraw.xml -o myencrypted.xml

If someone could event just point me in the right direction......
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
<authentication>
  <global>
    <logfile>c:\some\logfile\directory\logfile.txt</logfile>
    <eventlogs>True</eventlogs>
  </global>
  <Commands>
    <command name="notepad">
      <path>c:\windows\system32\notepad.exe</path>
      <opts>nefile.txt</opts>
      <windowstyle>normal</windowstyle>
    </command>
    <command name="regedit.permissionfile">
      <path>C:\WINDOWS\regedit.exe</path>
      <opts>/s c:\someregfile.reg</opts>
      <windowstyle>normal</windowstyle>
    </command>
  </Commands>
</authentication>
Start your free trial to view this solution
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

Question Stats
Zone: Web Development
Question Asked By: jjthomas3
Solution Provided By: hielo
Participating Experts: 2
Solution Grade: B
Views: 0
Translate:
Loading Advertisement...
 
[+][-]Accepted Solution by hielo

Rank: Guru

Accepted Solution by hielo:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Assisted Solution by BurntSky
Assisted Solution by BurntSky:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Author Comment by jjthomas3
Author Comment by jjthomas3:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
20080723-EE-VQP-34 / EE_QW_2_20070628