| 1 |
NAME |
| 2 |
UUID::URandom - UUIDs based on /dev/urandom or the Windows Crypto API |
| 3 |
|
| 4 |
VERSION |
| 5 |
version 0.001 |
| 6 |
|
| 7 |
SYNOPSIS |
| 8 |
use UUID::URandom qw/create_uuid/; |
| 9 |
|
| 10 |
my $uuid = create_uuid(); |
| 11 |
|
| 12 |
DESCRIPTION |
| 13 |
This module provides a portable, secure generator of RFC-4122 |
| 14 |
<https://tools.ietf.org/html/rfc4122> version 4 (random) UUIDs. It is a |
| 15 |
thin wrapper around Crypt::URandom to set the UUID version and variant |
| 16 |
bits required by the RFC. |
| 17 |
|
| 18 |
USAGE |
| 19 |
No functions are exported by default. |
| 20 |
|
| 21 |
FUNCTIONS |
| 22 |
create_uuid |
| 23 |
my $uuid = create_uuid(); |
| 24 |
|
| 25 |
# "\x95\x5a\xe4\x96\x8b\xb2\x45\x0b\x9c\x7e\x99\xf5\x01\xdf\x90\xfe" |
| 26 |
|
| 27 |
This returns a new UUID as a 16 byte 'binary' string. |
| 28 |
|
| 29 |
create_uuid_hex |
| 30 |
my $uuid = create_uuid_hex(); |
| 31 |
|
| 32 |
# "955ae4968bb2450b9c7e99f501df90fe" |
| 33 |
|
| 34 |
This returns a new UUID as a 32-byte hexadecimal string. |
| 35 |
|
| 36 |
create_uuid_string |
| 37 |
my $uuid = create_uuid_string(); |
| 38 |
|
| 39 |
# "955ae496-8bb2-450b-9c7e-99f501df90fe" |
| 40 |
|
| 41 |
This returns a new UUID in the 36-byte RFC-4122 canonical string |
| 42 |
representation. (N.B. The canonical representation is lower-case.) |
| 43 |
|
| 44 |
FORK AND THREAD SAFETY |
| 45 |
The underlying Crypt::URandom is believed to be fork and thread safe. |
| 46 |
|
| 47 |
SEE ALSO |
| 48 |
There are a number of other modules that provide version 4 UUIDs. Many |
| 49 |
rely on insecure or non-crypto-strength random number generators. |
| 50 |
|
| 51 |
* Data::GUID::Any |
| 52 |
|
| 53 |
* Data::UUID::LibUUID |
| 54 |
|
| 55 |
* UUID |
| 56 |
|
| 57 |
* UUID::Tiny |
| 58 |
|
| 59 |
* Data::UUID::MT |
| 60 |
|
| 61 |
SUPPORT |
| 62 |
Bugs / Feature Requests |
| 63 |
Please report any bugs or feature requests through the issue tracker at |
| 64 |
<https://github.com/dagolden/UUID-URandom/issues>. You will be notified |
| 65 |
automatically of any progress on your issue. |
| 66 |
|
| 67 |
Source Code |
| 68 |
This is open source software. The code repository is available for |
| 69 |
public review and contribution under the terms of the license. |
| 70 |
|
| 71 |
<https://github.com/dagolden/UUID-URandom> |
| 72 |
|
| 73 |
git clone https://github.com/dagolden/UUID-URandom.git |
| 74 |
|
| 75 |
AUTHOR |
| 76 |
David Golden <[email protected]> |
| 77 |
|
| 78 |
COPYRIGHT AND LICENSE |
| 79 |
This software is Copyright (c) 2018 by David Golden. |
| 80 |
|
| 81 |
This is free software, licensed under: |
| 82 |
|
| 83 |
The Apache License, Version 2.0, January 2004 |
| 84 |
|