{
    "content": [
        {
            "type": "text",
            "text": "# Crypt::Mac::Poly1305 (perldoc)\n\n## NAME\n\nCrypt::Mac::Poly1305 - Message authentication code Poly1305 (RFC 7539)\n\n## SYNOPSIS\n\n### Functional interface:\nuse Crypt::Mac::Poly1305 qw( poly1305 poly1305hex );\n# calculate MAC from string/buffer\n$poly1305raw  = poly1305($key, 'data buffer');\n$poly1305hex  = poly1305hex($key, 'data buffer');\n$poly1305b64  = poly1305b64($key, 'data buffer');\n$poly1305b64u = poly1305b64u($key, 'data buffer');\n### OO interface:\nuse Crypt::Mac::Poly1305;\n$d = Crypt::Mac::Poly1305->new($key);\n$d->add('any data');\n$d->addfile('filename.dat');\n$d->addfile(*FILEHANDLE);\n$resultraw  = $d->mac;     # raw bytes\n$resulthex  = $d->hexmac;  # hexadecimal form\n$resultb64  = $d->b64mac;  # Base64 form\n$resultb64u = $d->b64umac; # Base64 URL Safe form\n\n## DESCRIPTION\n\nProvides an interface to the Poly1305 message authentication code (MAC) 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::Mac::Poly1305",
        "section": "",
        "mode": "perldoc",
        "summary": "Crypt::Mac::Poly1305 - Message authentication code Poly1305 (RFC 7539)",
        "synopsis": "### Functional interface:\nuse Crypt::Mac::Poly1305 qw( poly1305 poly1305hex );\n# calculate MAC from string/buffer\n$poly1305raw  = poly1305($key, 'data buffer');\n$poly1305hex  = poly1305hex($key, 'data buffer');\n$poly1305b64  = poly1305b64($key, 'data buffer');\n$poly1305b64u = poly1305b64u($key, 'data buffer');\n### OO interface:\nuse Crypt::Mac::Poly1305;\n$d = Crypt::Mac::Poly1305->new($key);\n$d->add('any data');\n$d->addfile('filename.dat');\n$d->addfile(*FILEHANDLE);\n$resultraw  = $d->mac;     # raw bytes\n$resulthex  = $d->hexmac;  # hexadecimal form\n$resultb64  = $d->b64mac;  # Base64 form\n$resultb64u = $d->b64umac; # Base64 URL Safe form",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 21,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "EXPORT",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "FUNCTIONS",
                "lines": 32,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 31,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 4,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Crypt::Mac::Poly1305 - Message authentication code Poly1305 (RFC 7539)\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "### Functional interface:\nuse Crypt::Mac::Poly1305 qw( poly1305 poly1305hex );\n\n# calculate MAC from string/buffer\n$poly1305raw  = poly1305($key, 'data buffer');\n$poly1305hex  = poly1305hex($key, 'data buffer');\n$poly1305b64  = poly1305b64($key, 'data buffer');\n$poly1305b64u = poly1305b64u($key, 'data buffer');\n\n### OO interface:\nuse Crypt::Mac::Poly1305;\n\n$d = Crypt::Mac::Poly1305->new($key);\n$d->add('any data');\n$d->addfile('filename.dat');\n$d->addfile(*FILEHANDLE);\n$resultraw  = $d->mac;     # raw bytes\n$resulthex  = $d->hexmac;  # hexadecimal form\n$resultb64  = $d->b64mac;  # Base64 form\n$resultb64u = $d->b64umac; # Base64 URL Safe form\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Provides an interface to the Poly1305 message authentication code (MAC) algorithm.\n",
                "subsections": []
            },
            "EXPORT": {
                "content": "Nothing is exported by default.\n\nYou can export selected functions:\n\nuse Crypt::Mac::Poly1305 qw(poly1305 poly1305hex );\n\nOr all of them at once:\n\nuse Crypt::Mac::Poly1305 ':all';\n",
                "subsections": []
            },
            "FUNCTIONS": {
                "content": "poly1305\nLogically joins all arguments into a single string, and returns its Poly1305 message\nauthentication code encoded as a binary string.\n\n$poly1305raw = poly1305($key, 'data buffer');\n#or\n$poly1305raw = poly1305($key, 'any data', 'more data', 'even more data');\n\npoly1305hex\nLogically joins all arguments into a single string, and returns its Poly1305 message\nauthentication code encoded as a hexadecimal string.\n\n$poly1305hex = poly1305hex($key, 'data buffer');\n#or\n$poly1305hex = poly1305hex($key, 'any data', 'more data', 'even more data');\n\npoly1305b64\nLogically joins all arguments into a single string, and returns its Poly1305 message\nauthentication code encoded as a Base64 string.\n\n$poly1305b64 = poly1305b64($key, 'data buffer');\n#or\n$poly1305b64 = poly1305b64($key, 'any data', 'more data', 'even more data');\n\npoly1305b64u\nLogically joins all arguments into a single string, and returns its Poly1305 message\nauthentication code encoded as a Base64 URL Safe string (see RFC 4648 section 5).\n\n$poly1305b64url = poly1305b64u($key, 'data buffer');\n#or\n$poly1305b64url = poly1305b64u($key, 'any data', 'more data', 'even more data');\n",
                "subsections": []
            },
            "METHODS": {
                "content": "new\n$d = Crypt::Mac::Poly1305->new($key);\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\nmac\n$resultraw = $d->mac();\n\nhexmac\n$resulthex = $d->hexmac();\n\nb64mac\n$resultb64 = $d->b64mac();\n\nb64umac\n$resultb64url = $d->b64umac();\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "*   CryptX\n\n*   <https://www.ietf.org/rfc/rfc7539.txt>\n",
                "subsections": []
            }
        }
    }
}