首页 > 代码库 > php通过字符串生存hashCode

php通过字符串生存hashCode

/**
*
* 生存hashCode
*
*/
function hashCode($str){
if(empty($str))
return ‘‘;
$str = strtoupper($str);
$mdv = md5($str);
$mdv1 = substr($mdv,0,16);
$mdv2 = substr($mdv,16,16);
$crc1 = abs(crc32($mdv1));
$crc2 = abs(crc32($mdv2));
return bcmul($crc1,$crc2);
}










php通过字符串生存hashCode