protected function calculateChecksum($headerBlock)
    {
        $checksum = 0;
        for ($i = 0; $i<self::SIZE_HEADER_BLOCK; $i++) {
            if ($i < 148 || $i >= 156) {
                $checksum += ord($headerBlock[$i]);
            } else {
                $checksum += 32;
            }
        }

        return $checksum;
    }