private function generateTokenHash($token) { for ($h = 0, $i = strlen($token) - 1; $i >= 0; --$i) { $h += ord($token[$i]); } return $h; }