{
    "content": [
        {
            "type": "text",
            "text": "# Crypt::URandom (perldoc)\n\n## NAME\n\nCrypt::URandom - Provide non blocking randomness\n\n## SYNOPSIS\n\nuse Crypt::URandom();\nmy $randomstring50byteslong = Crypt::URandom::urandom(50);\nOR\nuse Crypt::URandom qw( urandom );\nmy $randomstring50byteslong = urandom(50);\n\n## DESCRIPTION\n\nThis Module is intended to provide an interface to the strongest available source of\nnon-blocking randomness on the current platform. Platforms currently supported are anything\nsupporting /dev/urandom and versions of Windows greater than or equal to Windows 2000.\n\n## Sections\n\n- **NAME**\n- **VERSION**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **SUBROUTINES/METHODS**\n- **DIAGNOSTICS**\n- **CONFIGURATION AND ENVIRONMENT**\n- **DEPENDENCIES**\n- **INCOMPATIBILITIES**\n- **BUGS AND LIMITATIONS**\n- **AUTHOR**\n- **ACKNOWLEDGEMENTS**\n- **LICENSE AND COPYRIGHT**\n- **DISCLAIMER OF WARRANTY**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Crypt::URandom",
        "section": "",
        "mode": "perldoc",
        "summary": "Crypt::URandom - Provide non blocking randomness",
        "synopsis": "use Crypt::URandom();\nmy $randomstring50byteslong = Crypt::URandom::urandom(50);\nOR\nuse Crypt::URandom qw( urandom );\nmy $randomstring50byteslong = urandom(50);",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "VERSION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "SUBROUTINES/METHODS",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "DIAGNOSTICS",
                "lines": 40,
                "subsections": []
            },
            {
                "name": "CONFIGURATION AND ENVIRONMENT",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DEPENDENCIES",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "INCOMPATIBILITIES",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "BUGS AND LIMITATIONS",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "ACKNOWLEDGEMENTS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "LICENSE AND COPYRIGHT",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "DISCLAIMER OF WARRANTY",
                "lines": 16,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Crypt::URandom - Provide non blocking randomness\n",
                "subsections": []
            },
            "VERSION": {
                "content": "This document describes Crypt::URandom version 0.36\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use Crypt::URandom();\n\nmy $randomstring50byteslong = Crypt::URandom::urandom(50);\n\nOR\n\nuse Crypt::URandom qw( urandom );\n\nmy $randomstring50byteslong = urandom(50);\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This Module is intended to provide an interface to the strongest available source of\nnon-blocking randomness on the current platform. Platforms currently supported are anything\nsupporting /dev/urandom and versions of Windows greater than or equal to Windows 2000.\n",
                "subsections": []
            },
            "SUBROUTINES/METHODS": {
                "content": "\"urandom\"\nThis function accepts an integer and returns a string of the same size filled with random\ndata. The first call will initialize the native cryptographic libraries (if necessary) and\nload all the required Perl libraries\n",
                "subsections": []
            },
            "DIAGNOSTICS": {
                "content": "\"No secure alternative for random number generation for Win32 versions older than W2K\"\nThe module cannot run on versions of Windows earlier than Windows 2000 as there is no\ncryptographic functions provided by the operating system.\n\n\"Could not import CryptAcquireContext\"\nThe module was unable to load the CryptAcquireContextA function from the advapi32 dynamic\nlibrary. The advapi32 library cannot probably be loaded.\n\n\"CryptAcquireContext failed\"\nThe module was unable to call the CryptAcquireContextA function from the advapi32 dynamic\nlibrary.\n\n\"Could not import CryptGenRandom\"\nThe module was unable to load the CryptGenRandom function from the advapi32 dynamic library.\n\n\"Could not import SystemFunction036\"\nThe module was unable to load the SystemFunction036 function from the advapi32 dynamic\nlibrary.\n\n\"The length argument must be supplied and must be an integer\"\nThe get method must be called with an integer argument to describe how many random bytes are\nrequired.\n\n\"CryptGenRandom failed\"\nThe Windows 2000 CryptGenRandom method call failed to generate the required amount of\nrandomness\n\n\"RtlGenRand failed\"\nThe post Windows 2000 RtlGenRand method call failed to generate the required amount of\nrandomness\n\n\"Only read n bytes from path\"\nThe /dev/urandom device did not return the desired amount of random bytes\n\n\"Failed to read from path\"\nThe /dev/urandom device returned an error when being read from\n\n\"Failed to open path\"\nThe /dev/urandom device returned an error when being opened\n",
                "subsections": []
            },
            "CONFIGURATION AND ENVIRONMENT": {
                "content": "Crypt::URandom requires no configuration files or environment variables.\n",
                "subsections": []
            },
            "DEPENDENCIES": {
                "content": "If the platform is Win32, the Win32::API module will be required. Otherwise no other modules\nother than those provided by perl will be required\n",
                "subsections": []
            },
            "INCOMPATIBILITIES": {
                "content": "None reported.\n",
                "subsections": []
            },
            "BUGS AND LIMITATIONS": {
                "content": "No bugs have been reported.\n\nPlease report any bugs or feature requests to \"bug-crypt-urandom@rt.cpan.org\", or through the\nweb interface at <http://rt.cpan.org>.\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "David Dick \"<ddick@cpan.org>\"\n",
                "subsections": []
            },
            "ACKNOWLEDGEMENTS": {
                "content": "The Win32::API code for interacting with Microsoft's CryptoAPI was stolen with extreme gratitude\nfrom Crypt::Random::Source::Strong::Win32 by Max Kanat-Alexander\n",
                "subsections": []
            },
            "LICENSE AND COPYRIGHT": {
                "content": "Copyright (c) 2011, David Dick \"<ddick@cpan.org>\". All rights reserved.\n\nThis module is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself.\n",
                "subsections": []
            },
            "DISCLAIMER OF WARRANTY": {
                "content": "BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE\nEXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER\nEXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE\nSOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY\nSERVICING, REPAIR, OR CORRECTION.\n\nIN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER,\nOR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE\nLICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR\nCONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT\nLIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR\nOTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n",
                "subsections": []
            }
        }
    }
}