Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How do I creating and read encrypted XML files with VB.Net?

Posted on 2008-10-28
4
Medium Priority
?
576 Views
Last Modified: 2012-05-05
Hey all,

I am having a bit of trouble figuring out how to write out and read back some encrytped XML files using VB.Net 2005 and could use some help.  

What I am trying to do is two fold:
-One:  Save the contents of a loaded XMLDocument object as an encrypted XML file (the type of encryption does not matter; however, speed of decryption will be important down the road.
-Two:  Read the contents of the encrypted file back into an XMLDocument object which I can then run some Xpath statements against.

The key would be known by both the program doing the encryption as well as the program doing the decryption.

Seems straight-forward.  I have found a lot of great XML/encryption/decryption examples but nothing that quite fits.  Your help is appreciated.
0
Comment
Question by:dgnatek
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 12

Accepted Solution

by:
techExtreme earned 2000 total points
ID: 22825266
Hello,
Have a look at this tutorial, it explains well about encrypting xml docs then decrypting them back and reading the content back.

http://blogs.msdn.com/shawnfa/archive/2003/11/14/57032.aspx
Hope it helped!

0
 

Author Comment

by:dgnatek
ID: 22825946
Thats a fine start.  However the example references an EncryptedXML object, supposedly part of System.Security.Cryptography.Xml.  However, I do not not have an XML (or XML.EncryptedXml) under System.Security.Cryptography.  I am on v2.0 of the framework.  Any suggestions?

Imports System
Imports System.Security.Cryptography
Imports System.Security.Cryptography.Xml             <=== Does not exist.
Imports System.Xml

Open in new window

0
 

Author Comment

by:dgnatek
ID: 22837107
As a followup to the above comment, it is necessary to add a reference to Sytem.Security.dll in your project properties before references to System.Security.Cryptography.Xml are valid.  Just adding an Imports statement was/is not enough.
0
 

Author Closing Comment

by:dgnatek
ID: 31510903
I was really hoping for a VB.Net based solution (example).  However, I was able to decode the C# stuff.  Thanks.
0

Featured Post

Threat Trends for MSPs to Watch

See the findings.
Despite its humble beginnings, phishing has come a long way since those first crudely constructed emails. Today, phishing sites can appear and disappear in the length of a coffee break, and it takes more than a little know-how to keep your clients secure.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SSL stands for “Secure Sockets Layer” and an SSL certificate is a critical component to keeping your website safe, secured, and compliant. Any ecommerce website must have an SSL certificate to ensure the safe handling of sensitive information like…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Suggested Courses

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question