{
    "content": [
        {
            "type": "text",
            "text": "# Crypt::Digest::Whirlpool (perldoc)\n\n## NAME\n\nCrypt::Digest::Whirlpool - Hash function Whirlpool [size: 512 bits]\n\n## SYNOPSIS\n\n### Functional interface:\nuse Crypt::Digest::Whirlpool qw( whirlpool whirlpoolhex whirlpoolb64 whirlpoolb64u\nwhirlpoolfile whirlpoolfilehex whirlpoolfileb64 whirlpoolfileb64u );\n# calculate digest from string/buffer\n$whirlpoolraw  = whirlpool('data string');\n$whirlpoolhex  = whirlpoolhex('data string');\n$whirlpoolb64  = whirlpoolb64('data string');\n$whirlpoolb64u = whirlpoolb64u('data string');\n# calculate digest from file\n$whirlpoolraw  = whirlpoolfile('filename.dat');\n$whirlpoolhex  = whirlpoolfilehex('filename.dat');\n$whirlpoolb64  = whirlpoolfileb64('filename.dat');\n$whirlpoolb64u = whirlpoolfileb64u('filename.dat');\n# calculate digest from filehandle\n$whirlpoolraw  = whirlpoolfile(*FILEHANDLE);\n$whirlpoolhex  = whirlpoolfilehex(*FILEHANDLE);\n$whirlpoolb64  = whirlpoolfileb64(*FILEHANDLE);\n$whirlpoolb64u = whirlpoolfileb64u(*FILEHANDLE);\n### OO interface:\nuse Crypt::Digest::Whirlpool;\n$d = Crypt::Digest::Whirlpool->new;\n$d->add('any data');\n$d->addfile('filename.dat');\n$d->addfile(*FILEHANDLE);\n$resultraw  = $d->digest;     # raw bytes\n$resulthex  = $d->hexdigest;  # hexadecimal form\n$resultb64  = $d->b64digest;  # Base64 form\n$resultb64u = $d->b64udigest; # Base64 URL Safe form\n\n## DESCRIPTION\n\nProvides an interface to the Whirlpool digest algorithm.\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::Digest::Whirlpool",
        "section": "",
        "mode": "perldoc",
        "summary": "Crypt::Digest::Whirlpool - Hash function Whirlpool [size: 512 bits]",
        "synopsis": "### Functional interface:\nuse Crypt::Digest::Whirlpool qw( whirlpool whirlpoolhex whirlpoolb64 whirlpoolb64u\nwhirlpoolfile whirlpoolfilehex whirlpoolfileb64 whirlpoolfileb64u );\n# calculate digest from string/buffer\n$whirlpoolraw  = whirlpool('data string');\n$whirlpoolhex  = whirlpoolhex('data string');\n$whirlpoolb64  = whirlpoolb64('data string');\n$whirlpoolb64u = whirlpoolb64u('data string');\n# calculate digest from file\n$whirlpoolraw  = whirlpoolfile('filename.dat');\n$whirlpoolhex  = whirlpoolfilehex('filename.dat');\n$whirlpoolb64  = whirlpoolfileb64('filename.dat');\n$whirlpoolb64u = whirlpoolfileb64u('filename.dat');\n# calculate digest from filehandle\n$whirlpoolraw  = whirlpoolfile(*FILEHANDLE);\n$whirlpoolhex  = whirlpoolfilehex(*FILEHANDLE);\n$whirlpoolb64  = whirlpoolfileb64(*FILEHANDLE);\n$whirlpoolb64u = whirlpoolfileb64u(*FILEHANDLE);\n### OO interface:\nuse Crypt::Digest::Whirlpool;\n$d = Crypt::Digest::Whirlpool->new;\n$d->add('any data');\n$d->addfile('filename.dat');\n$d->addfile(*FILEHANDLE);\n$resultraw  = $d->digest;     # raw bytes\n$resulthex  = $d->hexdigest;  # hexadecimal form\n$resultb64  = $d->b64digest;  # Base64 form\n$resultb64u = $d->b64udigest; # Base64 URL Safe form",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "Whirlpool",
                "section": "cryptography",
                "url": "https://www.chedong.com/phpMan.php/man/Whirlpool/cryptography/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 32,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "EXPORT",
                "lines": 11,
                "subsections": []
            },
            {
                "name": "FUNCTIONS",
                "lines": 67,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 45,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 4,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Crypt::Digest::Whirlpool - Hash function Whirlpool [size: 512 bits]\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "### Functional interface:\nuse Crypt::Digest::Whirlpool qw( whirlpool whirlpoolhex whirlpoolb64 whirlpoolb64u\nwhirlpoolfile whirlpoolfilehex whirlpoolfileb64 whirlpoolfileb64u );\n\n# calculate digest from string/buffer\n$whirlpoolraw  = whirlpool('data string');\n$whirlpoolhex  = whirlpoolhex('data string');\n$whirlpoolb64  = whirlpoolb64('data string');\n$whirlpoolb64u = whirlpoolb64u('data string');\n# calculate digest from file\n$whirlpoolraw  = whirlpoolfile('filename.dat');\n$whirlpoolhex  = whirlpoolfilehex('filename.dat');\n$whirlpoolb64  = whirlpoolfileb64('filename.dat');\n$whirlpoolb64u = whirlpoolfileb64u('filename.dat');\n# calculate digest from filehandle\n$whirlpoolraw  = whirlpoolfile(*FILEHANDLE);\n$whirlpoolhex  = whirlpoolfilehex(*FILEHANDLE);\n$whirlpoolb64  = whirlpoolfileb64(*FILEHANDLE);\n$whirlpoolb64u = whirlpoolfileb64u(*FILEHANDLE);\n\n### OO interface:\nuse Crypt::Digest::Whirlpool;\n\n$d = Crypt::Digest::Whirlpool->new;\n$d->add('any data');\n$d->addfile('filename.dat');\n$d->addfile(*FILEHANDLE);\n$resultraw  = $d->digest;     # raw bytes\n$resulthex  = $d->hexdigest;  # hexadecimal form\n$resultb64  = $d->b64digest;  # Base64 form\n$resultb64u = $d->b64udigest; # Base64 URL Safe form\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Provides an interface to the Whirlpool digest algorithm.\n",
                "subsections": []
            },
            "EXPORT": {
                "content": "Nothing is exported by default.\n\nYou can export selected functions:\n\nuse Crypt::Digest::Whirlpool qw(whirlpool whirlpoolhex whirlpoolb64 whirlpoolb64u\nwhirlpoolfile whirlpoolfilehex whirlpoolfileb64 whirlpoolfileb64u);\n\nOr all of them at once:\n\nuse Crypt::Digest::Whirlpool ':all';\n",
                "subsections": []
            },
            "FUNCTIONS": {
                "content": "whirlpool\nLogically joins all arguments into a single string, and returns its Whirlpool digest encoded as\na binary string.\n\n$whirlpoolraw = whirlpool('data string');\n#or\n$whirlpoolraw = whirlpool('any data', 'more data', 'even more data');\n\nwhirlpoolhex\nLogically joins all arguments into a single string, and returns its Whirlpool digest encoded as\na hexadecimal string.\n\n$whirlpoolhex = whirlpoolhex('data string');\n#or\n$whirlpoolhex = whirlpoolhex('any data', 'more data', 'even more data');\n\nwhirlpoolb64\nLogically joins all arguments into a single string, and returns its Whirlpool digest encoded as\na Base64 string, with trailing '=' padding.\n\n$whirlpoolb64 = whirlpoolb64('data string');\n#or\n$whirlpoolb64 = whirlpoolb64('any data', 'more data', 'even more data');\n\nwhirlpoolb64u\nLogically joins all arguments into a single string, and returns its Whirlpool digest encoded as\na Base64 URL Safe string (see RFC 4648 section 5).\n\n$whirlpoolb64url = whirlpoolb64u('data string');\n#or\n$whirlpoolb64url = whirlpoolb64u('any data', 'more data', 'even more data');\n\nwhirlpoolfile\nReads file (defined by filename or filehandle) content, and returns its Whirlpool digest encoded\nas a binary string.\n\n$whirlpoolraw = whirlpoolfile('filename.dat');\n#or\n$whirlpoolraw = whirlpoolfile(*FILEHANDLE);\n\nwhirlpoolfilehex\nReads file (defined by filename or filehandle) content, and returns its Whirlpool digest encoded\nas a hexadecimal string.\n\n$whirlpoolhex = whirlpoolfilehex('filename.dat');\n#or\n$whirlpoolhex = whirlpoolfilehex(*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\nwhirlpoolfileb64\nReads file (defined by filename or filehandle) content, and returns its Whirlpool digest encoded\nas a Base64 string, with trailing '=' padding.\n\n$whirlpoolb64 = whirlpoolfileb64('filename.dat');\n#or\n$whirlpoolb64 = whirlpoolfileb64(*FILEHANDLE);\n\nwhirlpoolfileb64u\nReads file (defined by filename or filehandle) content, and returns its Whirlpool digest encoded\nas a Base64 URL Safe string (see RFC 4648 section 5).\n\n$whirlpoolb64url = whirlpoolfileb64u('filename.dat');\n#or\n$whirlpoolb64url = whirlpoolfileb64u(*FILEHANDLE);\n",
                "subsections": []
            },
            "METHODS": {
                "content": "The OO interface provides the same set of functions as Crypt::Digest.\n\nnew\n$d = Crypt::Digest::Whirlpool->new();\n\nclone\n$d->clone();\n\nreset\n$d->reset();\n\nadd\n$d->add('any data');\n#or\n$d->add('any data', 'more data', 'even more data');\n\naddfile\n$d->addfile('filename.dat');\n#or\n$d->addfile(*FILEHANDLE);\n\naddbits\n$d->addbits($bitstring);   # e.g. $d->addbits(\"111100001010\");\n#or\n$d->addbits($data, $nbits); # e.g. $d->addbits(\"\\xF0\\xA0\", 16);\n\nhashsize\n$d->hashsize;\n#or\nCrypt::Digest::Whirlpool->hashsize();\n#or\nCrypt::Digest::Whirlpool::hashsize();\n\ndigest\n$resultraw = $d->digest();\n\nhexdigest\n$resulthex = $d->hexdigest();\n\nb64digest\n$resultb64 = $d->b64digest();\n\nb64udigest\n$resultb64url = $d->b64udigest();\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "*   CryptX, Crypt::Digest\n\n*   <https://en.wikipedia.org/wiki/Whirlpool(cryptography)>\n",
                "subsections": []
            }
        }
    }
}