{
    "mode": "perldoc",
    "parameter": "UUID::URandom",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/UUID%3A%3AURandom/json",
    "generated": "2026-06-13T13:22:54Z",
    "synopsis": "use UUID::URandom qw/createuuid/;\nmy $uuid = createuuid();",
    "sections": {
        "NAME": {
            "content": "UUID::URandom - UUIDs based on /dev/urandom or the Windows Crypto API\n",
            "subsections": []
        },
        "VERSION": {
            "content": "version 0.001\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use UUID::URandom qw/createuuid/;\n\nmy $uuid = createuuid();\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This module provides a portable, secure generator of RFC-4122\n<https://tools.ietf.org/html/rfc4122> version 4 (random) UUIDs. It is a thin wrapper around\nCrypt::URandom to set the UUID version and variant bits required by the RFC.\n",
            "subsections": []
        },
        "USAGE": {
            "content": "No functions are exported by default.\n",
            "subsections": []
        },
        "FUNCTIONS": {
            "content": "createuuid\nmy $uuid = createuuid();\n\n# \"\\x95\\x5a\\xe4\\x96\\x8b\\xb2\\x45\\x0b\\x9c\\x7e\\x99\\xf5\\x01\\xdf\\x90\\xfe\"\n\nThis returns a new UUID as a 16 byte 'binary' string.\n\ncreateuuidhex\nmy $uuid = createuuidhex();\n\n# \"955ae4968bb2450b9c7e99f501df90fe\"\n\nThis returns a new UUID as a 32-byte hexadecimal string.\n\ncreateuuidstring\nmy $uuid = createuuidstring();\n\n# \"955ae496-8bb2-450b-9c7e-99f501df90fe\"\n\nThis returns a new UUID in the 36-byte RFC-4122 canonical string representation. (N.B. The\ncanonical representation is lower-case.)\n",
            "subsections": []
        },
        "FORK AND THREAD SAFETY": {
            "content": "The underlying Crypt::URandom is believed to be fork and thread safe.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "There are a number of other modules that provide version 4 UUIDs. Many rely on insecure or\nnon-crypto-strength random number generators.\n\n*   Data::GUID::Any\n\n*   Data::UUID::LibUUID\n\n*   UUID\n\n*   UUID::Tiny\n\n*   Data::UUID::MT\n",
            "subsections": []
        },
        "SUPPORT": {
            "content": "Bugs / Feature Requests\nPlease report any bugs or feature requests through the issue tracker at\n<https://github.com/dagolden/UUID-URandom/issues>. You will be notified automatically of any\nprogress on your issue.\n",
            "subsections": [
                {
                    "name": "Source Code",
                    "content": "This is open source software. The code repository is available for public review and\ncontribution under the terms of the license.\n\n<https://github.com/dagolden/UUID-URandom>\n\ngit clone https://github.com/dagolden/UUID-URandom.git\n"
                }
            ]
        },
        "AUTHOR": {
            "content": "David Golden <dagolden@cpan.org>\n",
            "subsections": []
        },
        "COPYRIGHT AND LICENSE": {
            "content": "This software is Copyright (c) 2018 by David Golden.\n\nThis is free software, licensed under:\n\nThe Apache License, Version 2.0, January 2004\n",
            "subsections": []
        }
    },
    "summary": "UUID::URandom - UUIDs based on /dev/urandom or the Windows Crypto API",
    "flags": [],
    "examples": [],
    "see_also": []
}