Encryption within XML file

kasdoffe

Regular
Joined
Aug 27, 2003
Messages
57
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 RijndaelManaged class, but when i convert the encrypted byte array to a string to store in my file, it doesn't read back into a byte array the same as it was before converting it to a string.

Anyone have any ideas of how to encrypt some text in a plain text file? And still be able to decrypt it?

By the way, I absolutely need to decrypt it, so none of the hash code replies please :)
 
I recommend you use an XML friendly encryption algorithm too. I had to store an encrypted SQL Server password in my ASP.NET web.config file, and I had to change the encrpytion algorithm that we used in our vb6 projects to allow it to work.

I can post it here or email it to you if you need it.

Sam
 
Back
Top