Store encrypted password in my.settings?

H

Heinz K

Hi all,

with VS2005 I want to use my.settings for storing user settings. I also want
to store a password there, but of course not in plain text. How could I
encrypt the password (or the whole settings file?) ? Many thanks in advance!
 
G

Guest

well if you have a function that encrypts your string, or if you have a 3rd
party control that does that then you can just say

''EncryptString being the control or 3rd party encryption object
Dim encr as New EncryptString
Dim str as String = "Password"

my.setting.EncryptPass = encr.Encrypt(str)

also, im not positive so someone correct me if im wrong, i think VB has an
encrypt function of sorts, ive never used it so id check the documentation
for info on that
 
H

Heinz K

Yes, there is a system.Security.Cryptography section, but I'm not sure how
to work with this. The password should of course be "unhackable" (best as
possible, of course it would not be too serious if yomeone really hacks).
Someone knows what is the best way to do this? Or any tutorials on the net
which are quite good?I read some but could not decide whether they describe
a good solution or not.... Thanks!
system.Security.Cryptography
 

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