protected function getChecksum($string)
    {
        $length = strlen($string);
        $checksum = 0;

        for ($i = 0; $i < $length; ++$i) {
            $checksum += ord($string{$i}) * $i;
        }

        return $checksum;
    }
protected function getChecksum($string)
    {
        $length = strlen($string);
        $checksum = 0;

        for ($i = 0; $i < $length; ++$i) {
            $checksum += ord($string{$i}) * $i;
        }

        return $checksum;
    }
protected function getChecksum ( $ string ) { $ length = strlen ( $ string ) ; $ checksum = 0 ; for ( $ i = 0 ; $ i < $ length ; ++ $ i ) { $ checksum += ord ( $ string { $ i } ) * $ i ; } return $ checksum ; }
Returns checksum for passed input.

@param string $string The data as string

@author Benjamin Carl <opensource@clickalicious.de>
@return integer The calculated checksum
@access protected
Returns checksum for passed input .