{
    "content": [
        {
            "type": "text",
            "text": "# Crypt::DES (perldoc)\n\n## NAME\n\nCrypt::DES - Perl DES encryption module\n\n## SYNOPSIS\n\nuse Crypt::DES;\n\n## DESCRIPTION\n\nThe module implements the Crypt::CBC interface, which has the following methods\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **FUNCTIONS**\n- **EXAMPLE**\n- **NOTES**\n- **SEE ALSO**\n- **COPYRIGHT**\n- **MAINTAINER**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Crypt::DES",
        "section": "",
        "mode": "perldoc",
        "summary": "Crypt::DES - Perl DES encryption module",
        "synopsis": "use Crypt::DES;",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [
            "my $key = pack(\"H16\", \"0123456789ABCDEF\");",
            "my $cipher = new Crypt::DES $key;",
            "my $ciphertext = $cipher->encrypt(\"plaintex\");  # NB - 8 bytes",
            "print unpack(\"H16\", $ciphertext), \"\\n\";"
        ],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "FUNCTIONS",
                "lines": 26,
                "subsections": []
            },
            {
                "name": "EXAMPLE",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "NOTES",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "MAINTAINER",
                "lines": 3,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Crypt::DES - Perl DES encryption module\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use Crypt::DES;\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The module implements the Crypt::CBC interface, which has the following methods\n\nblocksize =item keysize =item encrypt =item decrypt\n",
                "subsections": []
            },
            "FUNCTIONS": {
                "content": "blocksize\nReturns the size (in bytes) of the block cipher.\n\nkeysize\nReturns the size (in bytes) of the key. Optimal size is 8 bytes.\n\nnew\nmy $cipher = new Crypt::DES $key;\n\nThis creates a new Crypt::DES BlockCipher object, using $key, where $key is a key of\n\"keysize()\" bytes.\n\nencrypt\nmy $cipher = new Crypt::DES $key;\nmy $ciphertext = $cipher->encrypt($plaintext);\n\nThis function encrypts $plaintext and returns the $ciphertext where $plaintext and\n$ciphertext should be of \"blocksize()\" bytes.\n\ndecrypt\nmy $cipher = new Crypt::DES $key;\nmy $plaintext = $cipher->decrypt($ciphertext);\n\nThis function decrypts $ciphertext and returns the $plaintext where $plaintext and\n$ciphertext should be of \"blocksize()\" bytes.\n",
                "subsections": []
            },
            "EXAMPLE": {
                "content": "my $key = pack(\"H16\", \"0123456789ABCDEF\");\nmy $cipher = new Crypt::DES $key;\nmy $ciphertext = $cipher->encrypt(\"plaintex\");  # NB - 8 bytes\nprint unpack(\"H16\", $ciphertext), \"\\n\";\n",
                "subsections": []
            },
            "NOTES": {
                "content": "Do note that DES only uses 8 byte keys and only works on 8 byte data blocks. If you're intending\nto encrypt larger blocks or entire files, please use Crypt::CBC in conjunction with this module.\nSee the Crypt::CBC documentation for proper syntax and use.\n\nAlso note that the DES algorithm is, by today's standard, weak encryption. Crypt::Blowfish is\nhighly recommended if you're interested in using strong encryption and a faster algorithm.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "Crypt::Blowfish Crypt::IDEA\n\nBruce Schneier, *Applied Cryptography*, 1995, Second Edition, published by John Wiley & Sons,\nInc.\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "The implementation of the DES algorithm was developed by, and is copyright of, Eric Young\n(eay@mincom.oz.au). Other parts of the perl extension and module are copyright of Systemics Ltd\n( http://www.systemics.com/ ). Cross-platform work and packaging for single algorithm\ndistribution is copyright of W3Works, LLC.\n",
                "subsections": []
            },
            "MAINTAINER": {
                "content": "This single-algorithm package and cross-platform code is maintained by Dave Paris\n<amused@pobox.com>.\n",
                "subsections": []
            }
        }
    }
}