# get stored password from pgsql #------------------------------- my $saved_pass = ExternalFunctions::get_word( $dbh, $login_name ); # hash the password given at login time # same function is used at registration time to create the password #------------------------------- my $key = 'KE'; my $eword = ExternalFunctions::create_encrypted( $word, $key ); # Compare the strings #------------------------------- my $passwd_check; $saved_pass eq $eword ? $passwd_check = "good" : $passwd_check = "fail";