Creating a secure hash?
#1
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 );
}


Messages In This Thread
Creating a secure hash? - by r0zzin - 01-21-2014, 03:18 AM
RE: Creating a secure hash? - by radix - 01-21-2014, 03:25 AM
RE: Creating a secure hash? - by r0zzin - 01-21-2014, 03:46 AM
RE: Creating a secure hash? - by unix-ninja - 01-21-2014, 03:49 AM
RE: Creating a secure hash? - by unix-ninja - 01-21-2014, 03:51 AM
RE: Creating a secure hash? - by epixoip - 01-21-2014, 08:09 AM
RE: Creating a secure hash? - by Incisive - 01-24-2014, 09:50 PM