User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C# section within the Software Development category of DaniWeb, a massive community of 456,573 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,573 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C# advertiser: Programming Forums
Views: 2603 | Replies: 1
Reply
Join Date: Oct 2007
Posts: 1
Reputation: Preethising is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Preethising Preethising is offline Offline
Newbie Poster

Question encrypting a column in sql server 2005 using c#

  #1  
Oct 25th, 2007
Dear friends,
i have problem in encrypting and storing the password field in my sql server 2005 database.
i want to concat my user name and password field and then encrypt and store using md5 in c# using visual stdio 2005
can anyone please help me out......
preethi
Last edited by Preethising : Oct 25th, 2007 at 3:33 pm.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Oct 2007
Location: VietNam
Posts: 5
Reputation: khanhtrung is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
khanhtrung khanhtrung is offline Offline
Newbie Poster

Re: encrypting a column in sql server 2005 using c#

  #2  
Oct 26th, 2007
Hi
Here maybe is something you looking for.I use MD5 class from System.Security.Cryptography namespace.
There has a method for encrypting a byte array to an MD5 encrypted byte array.Here is an example:
byte[] result, buffer;
            MD5 md5 = new MD5 CryptoServiceProvider();
            UTF8Encoding encorder = new UTF8Encoding();
            string source_str = "abcdf";                                    
            buffer = encorder.GetBytes(source_str);
            result = md5.ComputeHash(buffer);
Then,you can convert the buffer to any expected types of data.
Hope this useful.
Last edited by khanhtrung : Oct 26th, 2007 at 3:19 am.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb C# Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the C# Forum

All times are GMT -4. The time now is 6:09 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC