Re: How to encrypt/decrypt serialized data
- From: "Ben Voigt [C++ MVP]" <rbv@xxxxxxxxxxxxx>
- Date: Thu, 19 Mar 2009 16:52:35 -0500
Michael Meyer wrote:
hi,
I am writing a small client server application. The client is a
desktop application(C# .NET 2.0) and the user needs to login into the
server. The user has to enter username and password. I offer the
possibility to store username and password. I save the data into a
serialized object into the document and settings folder. Now I would
like to encrypt the stored data. Can someone give me a hint how to do
this.
See
http://msdn.microsoft.com/en-us/library/system.security.cryptography.protecteddata.aspx
This will encrypt the data so that only the currently logged in user can get
to it, other users or someone who steals the hard disk will see only
garbage. Any other method will require you to provide an encryption key,
which you'll either have to get from the user, defeating the purpose of
saving their credentials, or store somewhere that your application can find
it... but if your application can find it so can a hacker. Use the
ProtectedData class so everything gets encrypted using the Windows login
credentials.
Regards
Michael
.
- References:
- How to encrypt/decrypt serialized data
- From: Michael Meyer
- How to encrypt/decrypt serialized data
- Prev by Date: Re: ms sql server grabbing 5Gb. Is this good nomal?
- Next by Date: Re: How to run code on the main thread?
- Previous by thread: Re: How to encrypt/decrypt serialized data
- Next by thread: Re: Missing Assembly Version number (Vista)
- Index(es):
Relevant Pages
|