Acme-CPANModules-UUID
view release on metacpan or search on metacpan
- No functional changes.
- Mention Data::GUID.
0.004 2021-01-18 Released-By: PERLANCAR; Urgency: medium
- Add entry: Crypt::Misc [GH#1].
- [doc] Add information about variant & version encoding, add
feature v4_rfc4122.
- [ux] For Data::UUID & UUID::Tiny benchmark code, when producing
the last UUID, convert to string for nicer output in 'bencher
--show-items-results'.
0.003 2021-01-17 Released-By: PERLANCAR; Urgency: medium
- Add entries: UUID::Random::Secure, UUID::Random::PERLANCAR.
required beyond that are considered a bug and can be reported to me.
COPYRIGHT AND LICENSE
This software is copyright (c) 2023, 2021, 2020 by perlancar
<perlancar@cpan.org>.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
BUGS
Please report any bugs or feature requests on the bugtracker website
<https://rt.cpan.org/Public/Dist/Display.html?Name=Acme-CPANModules-UUID
>
When submitting a bug or request, please include a test-file or a patch
to an existing test-file that illustrates the bug or desired feature.
lib/Acme/CPANModules/UUID.pm view on Meta::CPAN
from hashing a namespace using SHA-1.
<pm:Data::UUID> should be your first choice, and when you cannot install XS
modules you can use <pm:UUID::Tiny> instead.
Aside from the modules listed as entries below, there are also:
<pm:App::UUIDUtils> (containing CLIs to create/check UUID), <pm:Data::GUID>
(currently just a wrapper for Data::UUID).
MARKDOWN
entry_features => {
v4_rfc4122 => {summary => 'Whether the generated v4 UUID follows RFC 4122 specification (i.e. encodes variant and version information in M & N positions)'},
v4_secure_random => {summary => 'Whether the module uses cryptographically secure pseudo-random number generator for v4 UUIDs'},
},
entries => [
{
module => 'Data::UUID',
description => <<'MARKDOWN',
This module creates v1 and v2 UUIDs. Depending on the OS, for MAC address, it
usually uses a hash of hostname instead. This module is XS, so performance is
good. If you cannot use an XS module, try <pm:UUID::Tiny> instead.
The benchmark code creates 1000+1 v1 string UUIDs.
MARKDOWN
bench_code_template => 'my $u = Data::UUID->new; $u->create for 1..1000; $u->to_string($u->create)',
features => {
is_xs => 1,
is_pp => 0,
create_v1 => 1,
create_v2 => 1,
create_v3 => 0,
create_v4 => 0,
create_v5 => 0,
},
},
lib/Acme/CPANModules/UUID.pm view on Meta::CPAN
description => <<'MARKDOWN',
This module provides access to libuuid via the FFI interface. It can create v1
as well as v4 (random) UUIDs. Note that Data::UUID (XS-based) is faster this
module (FFI-based).
The benchmark code creates 1000+1 v1 string UUIDs.
MARKDOWN
bench_code_template => 'UUID::FFI->new_time for 1..1000; UUID::FFI->new_time->as_hex',
features => {
is_xs => 1,
is_pp => 0,
create_v1 => 1,
create_v2 => 0,
create_v3 => 0,
create_v4 => 1,
v4_secure_random => 0,
v4_rfc4122 => 1,
create_v5 => 0,
},
lib/Acme/CPANModules/UUID.pm view on Meta::CPAN
create v1, v3, v4 UUIDs. However, the random v4 UUIDs are not cryptographically
secure; if you need cryptographically secure random UUIDs, use <pm:Crypt::Misc>.
The benchmark code creates 1000+1 v1 string UUIDs.
See also: <pm:Types::UUID> which is a type library that uses Data::UUID as the
backend.
MARKDOWN
bench_code_template => 'UUID::Tiny::create_uuid() for 1..1000; UUID::Tiny::uuid_to_string(UUID::Tiny::create_uuid())',
features => {
is_xs => 0,
is_pp => 1,
create_v1 => 1,
create_v2 => 0,
create_v3 => 1,
create_v4 => 1,
v4_secure_random => 0,
v4_rfc4122 => 1,
create_v5 => 1,
},
lib/Acme/CPANModules/UUID.pm view on Meta::CPAN
default pseudo-random generator is neither cryptographically secure nor has 128
bit of entropy. It also does not produce v4 UUIDs that conform to RFC 4122 (no
encoding of variant & version information).
To create a cryptographically secure random UUIDs, use <pm:Crypt::Misc>.
The benchmark code creates 1000+1 v4 string UUIDs.
MARKDOWN
bench_code_template => 'UUID::Random::generate() for 1..1000; ; UUID::Random::generate()',
features => {
is_xs => 0,
is_pp => 1,
create_v1 => 0,
create_v2 => 0,
create_v3 => 0,
create_v4 => 1,
v4_secure_random => 0,
v4_rfc4122 => 0,
create_v5 => 0,
},
lib/Acme/CPANModules/UUID.pm view on Meta::CPAN
{
module => 'UUID::Random::PERLANCAR',
description => <<'MARKDOWN',
Just another implementation of <pm:UUID::Random>.
The benchmark code creates 1000+1 v4 string UUIDs.
MARKDOWN
features => {
is_xs => 0,
is_pp => 1,
create_v1 => 0,
create_v2 => 0,
create_v3 => 0,
create_v4 => 1,
v4_secure_random => 0,
v4_rfc4122 => 1,
create_v5 => 0,
},
lib/Acme/CPANModules/UUID.pm view on Meta::CPAN
{
module => 'UUID::Random::Secure',
description => <<'MARKDOWN',
Just like <pm:UUID::Random>, except it uses <pm:Math::Random::Secure>'s
`irand()` to produce random numbers.
The benchmark code creates 1000+1 v4 string UUIDs.
MARKDOWN
features => {
is_xs => 0,
is_pp => 1,
create_v1 => 0,
create_v2 => 0,
create_v3 => 0,
create_v4 => 1,
v4_secure_random => 1,
v4_rfc4122 => 1,
create_v5 => 0,
},
lib/Acme/CPANModules/UUID.pm view on Meta::CPAN
module => 'Crypt::Misc',
description => <<'MARKDOWN',
This module from the <pm:CryptX> distribution has a function to create and check
v4 UUIDs.
The benchmark code creates 1000+1 v4 string UUIDs.
MARKDOWN
bench_code_template => 'Crypt::Misc::random_v4uuid() for 1..1000; Crypt::Misc::random_v4uuid()',
features => {
is_xs => 0,
is_pp => 1,
create_v1 => 0,
create_v2 => 0,
create_v3 => 0,
create_v4 => 1,
v4_secure_random => 1,
v4_rfc4122 => 1,
create_v5 => 0,
},
lib/Acme/CPANModules/UUID.pm view on Meta::CPAN
module => 'UUID',
description => <<'MARKDOWN',
This module generates DCE-compatible UUIDs, which according to RFC belongs to
the legacy variants.
The benchmark creates 1000+1 random UUIDs.
MARKDOWN
bench_code_template => 'my $uuid; UUID::generate_random($uuid) for 1..1000; UUID::generate_random($uuid); $uuid',
features => {
is_xs => 1,
is_pp => 0,
create_v1 => 0,
create_v2 => 0,
create_v3 => 0,
create_v4 => 0,
v4_secure_random => 0,
v4_rfc4122 => 0,
create_v5 => 0,
create_legacy => 1,
lib/Acme/CPANModules/UUID.pm view on Meta::CPAN
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2023, 2021, 2020 by perlancar <perlancar@cpan.org>.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=head1 BUGS
Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=Acme-CPANModules-UUID>
When submitting a bug or request, please include a test-file or a
patch to an existing test-file that illustrates the bug or desired
feature.
=cut
( run in 0.257 second using v1.01-cache-2.11-cpan-a5abf4f5562 )