ID: 32393 Updated by: [EMAIL PROTECTED] Reported By: crackit at interia dot pl -Status: Open +Status: Bogus Bug Type: Unknown/Other Function Operating System: linux PHP Version: 4.3.10 New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. Previous Comments: ------------------------------------------------------------------------ [2005-03-21 10:41:52] crackit at interia dot pl Description: ------------ I have made a simple hashing function and it returns bad value! Reproduce code: --------------- function hash ($MAIL, $PASS) { //$amail = str_split($MAIL); //$apass = str_split($PASS); $mdl=strlen($MAIL); for($z=0;$z<$mdl;$z++) { $amail[$z] = $MAIL{$z}; } $pdl=strlen($PASS); for($z=0;$z<$pdl;$z++) { $apass[$z] = $PASS{$z}; } $tab = array_merge($apass, $amail); $b = -1; $i=0; while( ($c = ord($tab[$i++])) != '' ) { $a = ($c ^ $b) + ($c << 8); $b = ($a >> 24) | ($a << 8); } return ($b < 0 ? -$b : $b); } $m = "[EMAIL PROTECTED]"; $p = "testpass"; $fun = hash($m, $p); Expected result: ---------------- on 3rd or 4th value of calculating hash everything go down ... there is very small number eg. -16 or sommething but there should be a huge one... like -4168570667... dudes what to do ?? Actual result: -------------- best regards :) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=32393&edit=1