Write data in XML file

F

Fabrizio

HI,
I would like to save some user configuration info on XML
file, but I also need to "hide" the password so that
nobody can read that info. Do i need an ecryption routine
or can I convert the password in some other format?
Thanks,
Fabrizio
 
N

Nicholas Paldino [.NET/C# MVP]

Fabrizio,

You can use any of the classes that derive from the
System.Security.Cryptography.SymmetricAlgorithm class to encrypt your
string. However, if you store the private key and IV value in the assembly,
you need to be aware that almost anyone could see it using a disassembler.
In this case, you might want an unmanaged assembly of some sort that would
return the key and iv value to you. While this isn't foolproof, it will
deter the majority of people who's threshold is looking in the disassembler.

Hope this helps.
 
D

Dmitri Shvetsov

http://rss.com.com/2100-1009_3-5053063.html

Take a look. That's about hashing, Windows crypto etc.

Dmitri.

Nicholas Paldino said:
Fabrizio,

You can use any of the classes that derive from the
System.Security.Cryptography.SymmetricAlgorithm class to encrypt your
string. However, if you store the private key and IV value in the assembly,
you need to be aware that almost anyone could see it using a disassembler.
In this case, you might want an unmanaged assembly of some sort that would
return the key and iv value to you. While this isn't foolproof, it will
deter the majority of people who's threshold is looking in the disassembler.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Fabrizio said:
HI,
I would like to save some user configuration info on XML
file, but I also need to "hide" the password so that
nobody can read that info. Do i need an ecryption routine
or can I convert the password in some other format?
Thanks,
Fabrizio
 

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

Top