Re: validating username and password in db???
Posted by:
Nick Roper
Date: April 30, 2005 02:21AM
Hi Naveen,
Try:
use Digest::MD5 qw(md5 md5_hex md5_base64);
and then
$chkpassword = $query->param("password");
$md5password = md5($chkpassword);
Then validate:
if (($chkuser eq $name) && ($md5password eq $password))
{
etc....
}
Note: This will load the Digest::MD5 module and give you access to the following functions:
md5 - returns the md5 digest as a binary string
md5_hex - returns as a hex string
md5_base64 - returns as a base64 encoded string
Depending on how the password has been hashed, you may need one of the other functions.
Let me know if this works.
Nick
--
Nick Roper
Subject
Written By
Posted
Re: validating username and password in db???
April 30, 2005 02:21AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.