473,387 Members | 1,859 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,387 software developers and data experts.

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.
Nov 19 '05 #1
1 1204
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.

Nov 19 '05 #2

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

Similar topics

1
by: Chip | last post by:
I am trying to get sessions to work on a log in screen to give certain users access to certain pages/directories. The problem is that when the login button is pushed (or the enter key pressed) the...
3
by: Steve | last post by:
I am new to .Net and Visual Studio, I have a login form and my main application form. When I login I want to call the application form, and dispose of the login. I have tried doing something...
6
by: Marty | last post by:
What is the best way do a login screen? I have the Main() method in my login screen. After iit checks the userid and password the OK button loads the main application form but the next line is...
1
by: Mohan | last post by:
Hi all, I am having a problem implementing forms authentication for a web application. I have a login screen and any unathorized user is directed to the login screen. The problem is that the...
0
by: JIM.H. | last post by:
Hello, My connection string in config.web: <appSettings> <add key="connStr" value="workstation id=myServer;packet size=4096;user id=MyUser;data source=MYSERVER;persist security info=True;initial...
9
by: dana lees | last post by:
Hello, I am developing a C# asp.net application. I am using the authentication and authorization mechanism, which its timeout is set to 60 minutes. My application consists of 2 frames - a...
1
by: leovega | last post by:
Hello, My aplication starts with a simple login window (login_page.aspx). Once the login/password is validated I redirect to an html which contains 3 frames. (mywebsite.html) The web site I...
3
by: bala | last post by:
Hi Gurus The scenario A MS Access frontend application with Oracle Backend (Linked Tables). The Database UserID and password is not stored and each user has a unique UserID and password. There...
10
by: =?Utf-8?B?UmljaGFyZCBCeXNvdXRo?= | last post by:
Hi In my app I have a SplashScreen, a login form and a main form. On launching the app, I'd like to show the SplashScreen while reading config files and attempting a database connection. I show...
4
by: Gaz | last post by:
I am having a bit of a problem getting my application to work properly. RIght here is my problem... WHen my C# windows app loads up the start form, i create a new thread and show the splash...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...

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.