in reply to Password Popup help

As other Monks have pointed out, your method is flawed. However you should not be discouraged from experimenting with this idea of yours, just be aware it will make a very _bad_ password system.

What you don't say, most importantly, is how this related to username. Usually we deal with authentication as 2 part, you supply 2 pieces of data and there is some relationship between them discernable with a 'secret' which tells us if the pair is any good.

What you are talking about is really a checksum system. This kind of system embeds 'intrinsic' data within just one datum so that it can be checked for self consistency. This is the basis of ticketing type systems that don't need usernames.
Credit cards have a very basic checksum system that is widely known and trivial to 'crack'. And such is the weakness of using them for login authentication, because once someone has seen more than 2 or 3 examples they can trivially work out the method for generating new and valid ones.
To answer your request for code try doing the following.
#!/usr/bin/perl print STDOUT "Enter a username: "; # ask for a user my $username = <STDIN>; # input the username chomp $username; print STDOUT "Enter a password: "; # ask for a pass my $password = <STDIN>; # input the pass chomp $password; my $crypted = crypt($password.$username,aa); # we store this value fo +r later.... print STDOUT "The username is $username\n"; print STDOUT "The password is $password\n"; print STDOUT "The encrypted passwd is: $crypted\n"; print "\n\n\n"; print STDOUT "Testing out the password system....\n"; while (1) { print STDOUT "Enter the username: "; my $ipusername = <STDIN>; chomp $ipusername; print STDOUT "Enter the password: "; my $ippassword = <STDIN>; chomp $ippassword; my $recrypted = crypt($ippassword.$ipusername,aa); print STDOUT "The retrived passwd is: $recrypted\n"; if ($recrypted eq $crypted) { dologin(); exit 0; } print STDOUT "Login Incorrect, please try again.\n\n\n"; } sub dologin { #do stuff print STDOUT "Login OK, welcome to the system.\n\n\n"; exit 0; }
This uses the standard crypt facility and is _not_ a very good method for passwords, but ok for non critical web services.
BOL
Andy.