login.php
/*
* Hashes and salts string into a one way aglorithim. Uses
* the "whirlpool" and "bcrypt" aglorithims to encrypt
* the string and the salt.
*
* @param $str The string to be encrypted
* @param $salt The salt to salt the string with
* @return $str The new, encrypted string.
*/
Hashes and salts string into a one way aglorithim. Uses
the "whirlpool" and "bcrypt" aglorithims to encrypt
the string and the salt.
Hashes and salts string into a one way aglorithim . Uses the " whirlpool " and " bcrypt " aglorithims to encrypt the string and the salt .
function bcrypt_password($str) {
	$str = crypt($str, '2piur;A?');
	$salt = 'e8b27v9ud4r9iio401l'.substr(hash('gost',$str),0,22);
	$second_salt = hash('whirlpool', $str);
	$second_salt = substr($second_salt, 0, 10);
	$first400 = substr($str, 0, 400);
	$theRest = substr($str, 400);
	$str = substr($second_salt, 0,4) . $first400 . $salt . $theRest;
	return $str;
}
function bcrypt_password ( $ str ) { $ str = crypt ( $ str , '2piur;A?' ) ; $ salt = 'e8b27v9ud4r9iio401l' . substr ( hash ( 'gost' , $ str ) , 0 , 22 ) ; $ second_salt = hash ( 'whirlpool' , $ str ) ; $ second_salt = substr ( $ second_salt , 0 , 10 ) ; $ first400 = substr ( $ str , 0 , 400 ) ; $ theRest = substr ( $ str , 400 ) ; $ str = substr ( $ second_salt , 0 , 4 ) . $ first400 . $ salt . $ theRest ; return $ str ; }
Hashes and salts string into a one way aglorithim.
Hashes and salts string into a one way aglorithim .