Storing encrypted password in xml file??

S

smita

Hi,

I have an XML file that stores a Profile of a user, including the username,
password, server name, etc.

I want to be able to leave the XML file as plain text, but have the password
attribute encrypted.

I have used the RC2CryptoServiceProvider class, but when i convert the
encrypted byte array to a string to store in my xml file, it(the encrypted
string) contains some illegal characters which are not allowed in an xml
file.


Anyone have any ideas of how to encrypt the password and still be able to
store it in the xml file.

By the way, I also need to decrypt it, so none of the hash code replies
please..

Thanks in advance:)

Smita.
 
M

Mark Berryman [MSFT]

Have you considered wrapping the password data using "CDATA" blocks?

--

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top