{
    "content": [
        {
            "type": "text",
            "text": "# Crypt::Checksum::CRC32 (perldoc)\n\n## NAME\n\nCrypt::Checksum::CRC32 - Compute CRC32 checksum\n\n## SYNOPSIS\n\n### Functional interface:\nuse Crypt::Checksum::CRC32 ':all';\n# calculate CRC32 checksum from string/buffer\n$checksumraw  = crc32data($data);\n$checksumhex  = crc32datahex($data);\n$checksumint  = crc32dataint($data);\n# calculate CRC32 checksum from file\n$checksumraw  = crc32file('filename.dat');\n$checksumhex  = crc32filehex('filename.dat');\n$checksumint  = crc32fileint('filename.dat');\n# calculate CRC32 checksum from filehandle\n$checksumraw  = crc32file(*FILEHANDLE);\n$checksumhex  = crc32filehex(*FILEHANDLE);\n$checksumint  = crc32fileint(*FILEHANDLE);\n### OO interface:\nuse Crypt::Checksum::CRC32;\n$d = Crypt::Checksum::CRC32->new;\n$d->add('any data');\n$d->add('another data');\n$d->addfile('filename.dat');\n$d->addfile(*FILEHANDLE);\n$checksumraw = $d->digest;     # raw 4 bytes\n$checksumhex = $d->hexdigest;  # hexadecimal form\n$checksumint = $d->intdigest;  # 32bit unsigned integer\n\n## DESCRIPTION\n\nCalculating CRC32 checksums.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **EXPORT**\n- **FUNCTIONS**\n- **METHODS**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Crypt::Checksum::CRC32",
        "section": "",
        "mode": "perldoc",
        "summary": "Crypt::Checksum::CRC32 - Compute CRC32 checksum",
        "synopsis": "### Functional interface:\nuse Crypt::Checksum::CRC32 ':all';\n# calculate CRC32 checksum from string/buffer\n$checksumraw  = crc32data($data);\n$checksumhex  = crc32datahex($data);\n$checksumint  = crc32dataint($data);\n# calculate CRC32 checksum from file\n$checksumraw  = crc32file('filename.dat');\n$checksumhex  = crc32filehex('filename.dat');\n$checksumint  = crc32fileint('filename.dat');\n# calculate CRC32 checksum from filehandle\n$checksumraw  = crc32file(*FILEHANDLE);\n$checksumhex  = crc32filehex(*FILEHANDLE);\n$checksumint  = crc32fileint(*FILEHANDLE);\n### OO interface:\nuse Crypt::Checksum::CRC32;\n$d = Crypt::Checksum::CRC32->new;\n$d->add('any data');\n$d->add('another data');\n$d->addfile('filename.dat');\n$d->addfile(*FILEHANDLE);\n$checksumraw = $d->digest;     # raw 4 bytes\n$checksumhex = $d->hexdigest;  # hexadecimal form\n$checksumint = $d->intdigest;  # 32bit unsigned integer",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 28,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "EXPORT",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "FUNCTIONS",
                "lines": 42,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 49,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 4,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Crypt::Checksum::CRC32 - Compute CRC32 checksum\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "### Functional interface:\nuse Crypt::Checksum::CRC32 ':all';\n\n# calculate CRC32 checksum from string/buffer\n$checksumraw  = crc32data($data);\n$checksumhex  = crc32datahex($data);\n$checksumint  = crc32dataint($data);\n# calculate CRC32 checksum from file\n$checksumraw  = crc32file('filename.dat');\n$checksumhex  = crc32filehex('filename.dat');\n$checksumint  = crc32fileint('filename.dat');\n# calculate CRC32 checksum from filehandle\n$checksumraw  = crc32file(*FILEHANDLE);\n$checksumhex  = crc32filehex(*FILEHANDLE);\n$checksumint  = crc32fileint(*FILEHANDLE);\n\n### OO interface:\nuse Crypt::Checksum::CRC32;\n\n$d = Crypt::Checksum::CRC32->new;\n$d->add('any data');\n$d->add('another data');\n$d->addfile('filename.dat');\n$d->addfile(*FILEHANDLE);\n$checksumraw = $d->digest;     # raw 4 bytes\n$checksumhex = $d->hexdigest;  # hexadecimal form\n$checksumint = $d->intdigest;  # 32bit unsigned integer\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Calculating CRC32 checksums.\n\n*Updated: v0.057*\n",
                "subsections": []
            },
            "EXPORT": {
                "content": "Nothing is exported by default.\n\nYou can export selected functions:\n\nuse Crypt::Checksum::CRC32 qw(crc32data crc32datahex crc32dataint crc32file crc32filehex crc32fileint);\n\nOr all of them at once:\n\nuse Crypt::Checksum::CRC32 ':all';\n",
                "subsections": []
            },
            "FUNCTIONS": {
                "content": "crc32data\nReturns checksum as raw octects.\n\n$checksumraw = crc32data('data string');\n#or\n$checksumraw = crc32data('any data', 'more data', 'even more data');\n\ncrc32datahex\nReturns checksum as a hexadecimal string.\n\n$checksumhex = crc32datahex('data string');\n#or\n$checksumhex = crc32datahex('any data', 'more data', 'even more data');\n\ncrc32dataint\nReturns checksum as unsigned 32bit integer.\n\n$checksumint = crc32dataint('data string');\n#or\n$checksumint = crc32dataint('any data', 'more data', 'even more data');\n\ncrc32file\nReturns checksum as raw octects.\n\n$checksumraw = crc32file('filename.dat');\n#or\n$checksumraw = crc32file(*FILEHANDLE);\n\ncrc32filehex\nReturns checksum as a hexadecimal string.\n\n$checksumhex = crc32filehex('filename.dat');\n#or\n$checksumhex = crc32filehex(*FILEHANDLE);\n\ncrc32fileint\nReturns checksum as unsigned 32bit integer.\n\n$checksumint = crc32fileint('filename.dat');\n#or\n$checksumint = crc32fileint(*FILEHANDLE);\n",
                "subsections": []
            },
            "METHODS": {
                "content": "new\nConstructor, returns a reference to the checksum object.\n\n$d = Crypt::Checksum::CRC32->new;\n\nclone\nCreates a copy of the checksum object state and returns a reference to the copy.\n\n$d->clone();\n\nreset\nReinitialize the checksum object state and returns a reference to the checksum object.\n\n$d->reset();\n\nadd\nAll arguments are appended to the message we calculate checksum for. The return value is the\nchecksum object itself.\n\n$d->add('any data');\n#or\n$d->add('any data', 'more data', 'even more data');\n\naddfile\nThe content of the file (or filehandle) is appended to the message we calculate checksum for.\nThe return value is the checksum object itself.\n\n$d->addfile('filename.dat');\n#or\n$d->addfile(*FILEHANDLE);\n\nBEWARE: You have to make sure that the filehandle is in binary mode before you pass it as\nargument to the addfile() method.\n\ndigest\nReturns the binary checksum (raw bytes).\n\n$resultraw = $d->digest();\n\nhexdigest\nReturns the checksum encoded as a hexadecimal string.\n\n$resulthex = $d->hexdigest();\n\nintdigest\nReturns the checksum encoded as unsigned 32bit integer.\n\n$resultint = $d->intdigest();\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "*   CryptX\n\n*   <https://en.wikipedia.org/wiki/Cyclicredundancycheck>\n",
                "subsections": []
            }
        }
    }
}