Guest User

crc32 php fix

a guest
Feb 14th, 2012
76
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public static function signed_crc32($)
  2. {
  3. $hash = crc32($text);
  4.  
  5. if ($hash & 0x80000000)
  6. {
  7. $hash ^= 0xffffffff;
  8. $hash += 1;
  9. $hash = -$hash;
  10. }
  11.  
  12. return $hash;
  13. }
RAW Paste Data