Home All Groups Group Topic Archive Search About

Store encrypted password in my.settings?

Author
30 Jun 2006 1:08 PM
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!

Author
30 Jun 2006 6:28 PM
iwdu15
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
--
-iwdu15
Author
2 Jul 2006 7:11 PM
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

Show quoteHide quote
"iwdu15" <jmmgoalsteratyahoodotcom> wrote in message
news:165EAD17-B8A2-4788-8FB8-B63A27E5A9AA@microsoft.com...
> 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
> --
> -iwdu15