473,395 Members | 1,440 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Serialization of Application Settings password

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

Nov 21 '05 #1
1 1320
I believe I solved my problem by making 2 Public Functions:

Public Function SetPWD(ByVal PWD As String)
mPWD = TextScramble(PWD)
End Function
Public Function GetPWD() As String
Return TextUnScramble(mPWD)
End Function

Thanks,
Curtis

"Curtis" <cs*****@hotmail.com> wrote in message
news:Og**************@TK2MSFTNGP12.phx.gbl...
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

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: ron | last post by:
Hi, I have class object that i serialize using the System.Xml.Serialization class. Intermittently the object is not getting serialized correctly, using System.Xml.Serialization classes....
2
by: Mike | last post by:
Hello. I am using C# in .NET v1.1. I am trying to serialize an object to disk and read it back again. The serialization seems to work OK (at least, it completes without error). However, I get...
0
by: davesauny | last post by:
Hi guys, I'm having trouble with serialization especially of array elements! What I have is an array of clsUsers which have various properties as shown in the code below The XML I want to...
2
by: Petr PALAS | last post by:
Hi, when I open ANY ASP.NET application on my computer I get this message: ---------------------------------------------------------------------------- ---- Server Application Unavailable ...
5
by: Ken Cox [Microsoft MVP] | last post by:
MS has posted this here: http://www.asp.net/faq/ms03-32-issue.aspx Fix for: 'Server Application Unavailable' Error after Applying Security Update for IE...
1
by: Reza Sadeghi | last post by:
Hi I am getting this error when I tried to browse any asp.net in visual studio.net. I can build the project but when I try to run and debug the project I get error message that "Unable to start...
6
by: Larry Serflaten | last post by:
Acording to Bob Powell, serializing an object should be a breeze: http://groups.google.com/groups?hl=en&lr=&safe=off&selm=%23TR3qvCcCHA.2544%40tkmsftngp11 But its not happening, and I can't see...
10
by: SStory | last post by:
My app is near completed for the basic feature of version 1.0. I have an extensive object model and I now want to persist my objects using serialization. I have chosen binaryformatter to...
4
by: Sjaakie | last post by:
Hi, I've read some articles on serialization, but I don't see how to serialize the xml-structure below (if it is possible at all). Could you point me in the right direction? TIA <?xml...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.