public static function checksum($algo, $data, $checksumLen = 4)
    {
        // shortcuts + use Buffer always
        $data = self::prepareInputBuffer($data);
        $hash = self::hash($algo, $data, false)->getBinary();
        $out = new Buffer(substr($hash, 0, $checksumLen), $checksumLen);
        return $out;
    }
public static function checksum($algo, $data, $checksumLen = 4)
    {
        // shortcuts + use Buffer always
        $data = self::prepareInputBuffer($data);
        $hash = self::hash($algo, $data, false)->getBinary();
        $out = new Buffer(substr($hash, 0, $checksumLen), $checksumLen);
        return $out;
    }
public static function checksum ( $ algo , $ data , $ checksumLen = 4 ) { // shortcuts + use Buffer always $ data = self :: prepareInputBuffer ( $ data ) ; $ hash = self :: hash ( $ algo , $ data , false ) -> getBinary ( ) ; $ out = new Buffer ( substr ( $ hash , 0 , $ checksumLen ) , $ checksumLen ) ; return $ out ; }
Generate a checksum of data buffer `data` and of length
`checksumLen`. Default length is 4 bytes.

@param   string                     $algo
@param   string|\NEM\Core\Buffer    $data
@param   integer                    $checksumLen
@return  \NEM\Core\Buffer
Generate a checksum of data buffer data and of length checksumLen . Default length is 4 bytes .