01-21-2014, 03:18 AM
As a web designer I am looking to create a hash that is hard to crack. I found this site and thought to ask for info that anyone can give. I created a somewhat random function with php. Any help and feedback would be very much appreciated.
Code:
function dbHash($password,$name){
global $salt;
if(isOdd(strlen($password))){
return sha1($salt.$password.$name).md5($name.$salt.$password);
}else{
return md5($salt.$password.$name).sha1($password.$name.$salt);
}
}
//
function isOdd( $int )
{
return( $int & 1 );
}