Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to make a password verification system?

Status
Not open for further replies.

glenjoy

Banned
Joined
Jan 1, 2004
Messages
962
Helped
72
Reputation
146
Reaction score
20
Trophy points
1,298
Location
Philippines
Activity points
0
I am doing a security system and having a problem on coding techniques.

I am using a numeric keypad.

1. I will input the pin numbers on the keypad, but how to store them? Byte by byte so I have to create an array of variables and increment them each time?

2. How to compare them and the stored numeric password?

thanks.
 

I don't see any problem in this, if you know the number of maximum people that will use the system you can allot the memory for it, with 1 place reserved for a pointer variable that points to the end of the current list. Whenever one enters the pin, just search the list for a match.
 

if you want to use a PIC you should check the PIC controlled intruder alarm that came in the April 2002 issue of EPE. that might give you an idea
 

password checking routine assuming 6 character long password When you read keys call this function and check its return value .
0 means password match
1 continue key input
-1 password did not match
-2 input overflow

static char str[7];
static char pos =0;
static const char *psw_p = "WELL";

char CheckPassowrd(char key)
{
if (key == CHAR_ENTER)
{
str[pos] = 0;
pos = 0;
return (strcmp(psw_p, str)==0)? 0 : -1;
}
if (pos = 6)
{
pos = 0;
return -2;
}

str[pos++] = key;

return 1;
}
 

To store data from keyboard, you need a keyboard buffer.
To handle verification, you need to compare the current buffer with actual password.

Go to http://www.geocities.com/issaiass/ and navigate to "Notas Tecnicas", intermediate section, and search for the LCD + KBD paper.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top