![]() |
Q: login screen
Hello,
Can anyone give me a link (C#) that handle login screen while keeping username and password encrypted in the SQL Server? Thanks, Jim. |
RE: Q: login screen
You can store the password in md5 format in the database and when the
password is entered, you can convert it to md5 and compare to the md5 password in the database. use this method to convert a string to md5: public static string GetMD5HashForString(string value) { if (value == null) throw new ArgumentNullException("The 'value' parameter cannot be null."); ASCIIEncoding ae = new ASCIIEncoding(); byte[] stringAsBytes = ae.GetBytes(value); byte[] hash = new MD5CryptoServiceProvider().ComputeHash(stringAsByt es); // Convert the byte array to a printable string. StringBuilder sb = new StringBuilder(32); foreach (byte hex in hash) sb.Append(hex.ToString("X2")); return sb.ToString().ToUpper(); } "JIM.H." wrote: > Hello, > Can anyone give me a link (C#) that handle login screen while keeping > username and password encrypted in the SQL Server? > Thanks, > Jim. |
| All times are GMT. The time now is 11:21 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.