I am using the application settings example @
http://msdn.microsoft.com/msdnmag/is...s/default.aspx .
My application needs to save a user name and password in encrypted format
into the XML settings file. I modified the settings.vb class to include code
that encrypts and decrypts the user name and password as needed. The problem
I am having is getting the username and password to store as encrypted in
the XML document. I have a public property that looks like this:
Public Property PWD() As String
Get
PWD = TextUnScramble(mPWD)
End Get
Set(ByVal Value As String)
mPWD = TextScramble(Value)
End Set
End Property
When I load the password back into my application the settings class
deserializes the information from the XML file so it consequently runs the
set method of my PWD property which then my app must call the Get of PWD to
get the actual value back into my application. The same situation occurs in
reverse when it serializes the information to the XML. When is the proper
time to run the methods I have defined as TextUnScramble and TextScramble. I
also want to be able to retrieve the information in the PWD property from my
app in decrypted format. Any help would be greatly appreciated.
Thanks,
Curtis