Page 1 of 1

Can I hash a database password in a PHP class?

Posted: Mon Mar 31, 2008 10:35 pm
by JAB Creations
I just tried the following...

Code: Select all

$username = $my_db->give('username');
$password = $my_db->give('password');
$hostname = "localhost";    
$dbh = mysql_connect($hostname, $username, $password) or exit($dbip = "0");
That seems pretty nifty however is there a way I can encrypt/hash a password? If so how would I need to modify the code?

Re: Can I hash a database password in a PHP class?

Posted: Tue Apr 01, 2008 12:21 am
by Mordred
No, you can't.