{
    "content": [
        {
            "type": "text",
            "text": "# Digest::Perl::MD5 (perldoc)\n\n## NAME\n\nDigest::MD5::Perl - Perl implementation of Ron Rivests MD5 Algorithm\n\n## SYNOPSIS\n\n# Functional style\nuse Digest::MD5  qw(md5 md5hex md5base64);\n$hash = md5 $data;\n$hash = md5hex $data;\n$hash = md5base64 $data;\n# OO style\nuse Digest::MD5;\n$ctx = Digest::MD5->new;\n$ctx->add($data);\n$ctx->addfile(*FILE);\n$digest = $ctx->digest;\n$digest = $ctx->hexdigest;\n$digest = $ctx->b64digest;\n\n## DESCRIPTION\n\nThis modules has the same interface as the much faster \"Digest::MD5\". So you can easily exchange\nthem, e.g.\n\n## Sections\n\n- **NAME**\n- **DISCLAIMER**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **EXAMPLES**\n- **LIMITATIONS**\n- **SEE ALSO** (1 subsections)\n- **COPYRIGHT**\n- **AUTHORS**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Digest::Perl::MD5",
        "section": "",
        "mode": "perldoc",
        "summary": "Digest::MD5::Perl - Perl implementation of Ron Rivests MD5 Algorithm",
        "synopsis": "# Functional style\nuse Digest::MD5  qw(md5 md5hex md5base64);\n$hash = md5 $data;\n$hash = md5hex $data;\n$hash = md5base64 $data;\n# OO style\nuse Digest::MD5;\n$ctx = Digest::MD5->new;\n$ctx->add($data);\n$ctx->addfile(*FILE);\n$digest = $ctx->digest;\n$digest = $ctx->hexdigest;\n$digest = $ctx->b64digest;",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [
            "The simplest way to use this library is to import the md5hex() function (or one of its",
            "cousins):",
            "use Digest::Perl::MD5 'md5hex';",
            "print 'Digest is ', md5hex('foobarbaz'), \"\\n\";",
            "The above example would print out the message",
            "Digest is 6df23dc03f9b54cc38a0fc1483df6e21",
            "provided that the implementation is working correctly. The same checksum can also be calculated",
            "in OO style:",
            "use Digest::MD5;",
            "$md5 = Digest::MD5->new;",
            "$md5->add('foo', 'bar');",
            "$md5->add('baz');",
            "$digest = $md5->hexdigest;",
            "print \"Digest is $digest\\n\";",
            "The digest methods are destructive. That means you can only call them once and the $md5 objects",
            "is reset after use. You can make a copy with clone:",
            "$md5->clone->hexdigest"
        ],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DISCLAIMER",
                "lines": 11,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 20,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 21,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 27,
                "subsections": []
            },
            {
                "name": "LIMITATIONS",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": [
                    {
                        "name": "md5",
                        "lines": 4
                    }
                ]
            },
            {
                "name": "COPYRIGHT",
                "lines": 31,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 9,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Digest::MD5::Perl - Perl implementation of Ron Rivests MD5 Algorithm\n",
                "subsections": []
            },
            "DISCLAIMER": {
                "content": "This is not an interface (like \"Digest::MD5\") but a Perl implementation of MD5. It is written in\nperl only and because of this it is slow but it works without C-Code. You should use\n\"Digest::MD5\" instead of this module if it is available. This module is only useful for\n\n*   computers where you cannot install \"Digest::MD5\" (e.g. lack of a C-Compiler)\n\n*   encrypting only small amounts of data (less than one million bytes). I use it to hash\npasswords.\n\n*   educational purposes\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "# Functional style\nuse Digest::MD5  qw(md5 md5hex md5base64);\n\n$hash = md5 $data;\n$hash = md5hex $data;\n$hash = md5base64 $data;\n\n\n# OO style\nuse Digest::MD5;\n\n$ctx = Digest::MD5->new;\n\n$ctx->add($data);\n$ctx->addfile(*FILE);\n\n$digest = $ctx->digest;\n$digest = $ctx->hexdigest;\n$digest = $ctx->b64digest;\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This modules has the same interface as the much faster \"Digest::MD5\". So you can easily exchange\nthem, e.g.\n\nBEGIN {\neval {\nrequire Digest::MD5;\nimport Digest::MD5 'md5hex'\n};\nif ($@) { # ups, no Digest::MD5\nrequire Digest::Perl::MD5;\nimport Digest::Perl::MD5 'md5hex'\n}\n}\n\nIf the \"Digest::MD5\" module is available it is used and if not you take \"Digest::Perl::MD5\".\n\nYou can also install the Perl part of Digest::MD5 together with Digest::Perl::MD5 and use\nDigest::MD5 as normal, it falls back to Digest::Perl::MD5 if it cannot load its object files.\n\nFor a detailed Documentation see the \"Digest::MD5\" module.\n",
                "subsections": []
            },
            "EXAMPLES": {
                "content": "The simplest way to use this library is to import the md5hex() function (or one of its\ncousins):\n\nuse Digest::Perl::MD5 'md5hex';\nprint 'Digest is ', md5hex('foobarbaz'), \"\\n\";\n\nThe above example would print out the message\n\nDigest is 6df23dc03f9b54cc38a0fc1483df6e21\n\nprovided that the implementation is working correctly. The same checksum can also be calculated\nin OO style:\n\nuse Digest::MD5;\n\n$md5 = Digest::MD5->new;\n$md5->add('foo', 'bar');\n$md5->add('baz');\n$digest = $md5->hexdigest;\n\nprint \"Digest is $digest\\n\";\n\nThe digest methods are destructive. That means you can only call them once and the $md5 objects\nis reset after use. You can make a copy with clone:\n\n$md5->clone->hexdigest\n",
                "subsections": []
            },
            "LIMITATIONS": {
                "content": "This implementation of the MD5 algorithm has some limitations:\n\n*   It's slow, very slow. I've done my very best but Digest::MD5 is still about 100 times\nfaster. You can only encrypt Data up to one million bytes in an acceptable time. But it's\nvery useful for encrypting small amounts of data like passwords.\n\n*   You can only encrypt up to 2^32 bits = 512 MB on 32bit archs. But You should use\n\"Digest::MD5\" for those amounts of data anyway.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "Digest::MD5\n",
                "subsections": [
                    {
                        "name": "md5",
                        "content": "RFC 1321\n\ntools/md5: a small BSD compatible md5 tool written in pure perl.\n"
                    }
                ]
            },
            "COPYRIGHT": {
                "content": "This library is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself.\n\nCopyright 2000 Christian Lackas, Imperia Software Solutions\nCopyright 1998-1999 Gisle Aas.\nCopyright 1995-1996 Neil Winton.\nCopyright 1991-1992 RSA Data Security, Inc.\n\nThe MD5 algorithm is defined in RFC 1321. The basic C code implementing the algorithm is derived\nfrom that in the RFC and is covered by the following copyright:\n\n*   Copyright (C) 1991-1992, RSA Data Security, Inc. Created 1991. All rights reserved.\n\nLicense to copy and use this software is granted provided that it is identified as the \"RSA\nData Security, Inc. MD5 Message-Digest Algorithm\" in all material mentioning or referencing\nthis software or this function.\n\nLicense is also granted to make and use derivative works provided that such works are\nidentified as \"derived from the RSA Data Security, Inc. MD5 Message-Digest Algorithm\" in all\nmaterial mentioning or referencing the derived work.\n\nRSA Data Security, Inc. makes no representations concerning either the merchantability of\nthis software or the suitability of this software for any particular purpose. It is provided\n\"as is\" without express or implied warranty of any kind.\n\nThese notices must be retained in any copies of any part of this documentation and/or\nsoftware.\n\nThis copyright does not prohibit distribution of any version of Perl containing this extension\nunder the terms of the GNU or Artistic licenses.\n",
                "subsections": []
            },
            "AUTHORS": {
                "content": "The original MD5 interface was written by Neil Winton (<N.Winton (at) axion.bt.co.uk>).\n\n\"Digest::MD5\" was made by Gisle Aas <gisle (at) aas.no> (I took his Interface and part of the\ndocumentation).\n\nThanks to Guido Flohr for his 'use integer'-hint.\n\nThis release was made by Christian Lackas <delta (at) lackas.net>.\n",
                "subsections": []
            }
        }
    }
}