1,105,177 Community Members

code for login screen in c

Member Avatar
mohan_198505
Newbie Poster
4 posts since Jan 2009
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

hi, can anyone provide me the C code for login in screen.I m using C(borland)compiler and working on xp.
The requirments are following-
1.Should accept user name as user-1,user-2
2.Accept password(should not displyed on the screen)
3.A case insenstive coparison is to be done for usname and password.
4.Login name and password are hardcoded in the program and not strored in any file.

Member Avatar
Narue
Bad Cop
12,139 posts since Sep 2004
Reputation Points: 5,693 [?]
Q&As Helped to Solve: 1,537 [?]
Skill Endorsements: 80 [?]
Team Colleague
 
0
 

We're not here to do your homework for you. If you want help, you'll have to make an honest attempt at solving the problem and then ask a specific question.

Member Avatar
snivas519
Newbie Poster
10 posts since Aug 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

ya...i can do...but it requires a file to store the user data...

Member Avatar
Adak
Posting Virtuoso
1,711 posts since Jun 2008
Reputation Points: 419 [?]
Q&As Helped to Solve: 207 [?]
Skill Endorsements: 10 [?]
 
0
 

ya...i can do...but it requires a file to store the user data...

Welcome to the forum, Snivas!

As for the file being needed - <wink> <wink> I KNOW you were joking.

Please God, that's all I ask for today, let Snivas be enjoying zee little joke. ;)

Member Avatar
harris21
Newbie Poster
9 posts since Aug 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 1 [?]
Skill Endorsements: 0 [?]
 
0
 

its not that difficult, first try urself and den ask ur problem

Member Avatar
0x69
Junior Poster
130 posts since Apr 2010
Reputation Points: 41 [?]
Q&As Helped to Solve: 9 [?]
Skill Endorsements: 0 [?]
 
0
 

4.Login name and password are hardcoded in the program and not strored in any file.

I find this self-contradictory. "Hardcoded" means that password WILL BE stored in program file as embedded string resource. So for added security i suggest to hardcode not plain password, but instead MD5 hash of password. And when user enters password - you will do check md5(password)== hardcoded_md5_of_password .
Point is that if something will extract password hash from the executable file - he/she will not find-out password, because md5 hash is one way encryption. (Unless he/she does bruteforce,- generates all possible passwords and compares it's hash with stored one).
In any case a way of storing md5 hash is a LOT more secure than storing just plain password.
p.s.
google MD5,- there a a lot of md5 implementations in C.
good luck

Member Avatar
harris21
Newbie Poster
9 posts since Aug 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 1 [?]
Skill Endorsements: 0 [?]
 
0
 

check in below link for accepting password(according to your requirement) in C
<<snip>>

Member Avatar
Adak
Posting Virtuoso
1,711 posts since Jun 2008
Reputation Points: 419 [?]
Q&As Helped to Solve: 207 [?]
Skill Endorsements: 10 [?]
 
0
 

This is a very old thread from 2009.

If you have a current problem like this, please start a new thread, and don't add to this one.

The "zombie's" need their rest. ;)

Member Avatar
kapilverma
Newbie Poster
1 post since Dec 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 
Member Avatar
dij_0983
Light Poster
49 posts since Nov 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 1 [?]
Skill Endorsements: 0 [?]
 
0
 

http://veejava.com/c/arrays/character-one-dimensional-array.html c login program

check Adak's post above :-/

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article