Index: ossp-pkg/uuid/perl/uuid.pm RCS File: /v/ossp/cvs/ossp-pkg/uuid/perl/Attic/uuid.pm,v rcsdiff -q -kk '-r1.7' '-r1.8' -u '/v/ossp/cvs/ossp-pkg/uuid/perl/Attic/uuid.pm,v' 2>/dev/null --- uuid.pm 2005/01/23 11:28:54 1.7 +++ uuid.pm 2005/01/23 12:38:10 1.8 @@ -61,6 +61,7 @@ UUID_MAKE_V1 UUID_MAKE_V3 UUID_MAKE_V4 + UUID_MAKE_V5 UUID_MAKE_MC UUID_FMT_BIN UUID_FMT_STR @@ -136,12 +137,13 @@ if ($spec eq 'v1') { $mode_code |= $self->UUID_MAKE_V1; } elsif ($spec eq 'v3') { $mode_code |= $self->UUID_MAKE_V3; } elsif ($spec eq 'v4') { $mode_code |= $self->UUID_MAKE_V4; } + elsif ($spec eq 'v5') { $mode_code |= $self->UUID_MAKE_V5; } elsif ($spec eq 'mc') { $mode_code |= $self->UUID_MAKE_MC; } else { croak("invalid mode specification \"$spec\""); } } - if ($mode_code & $self->UUID_MAKE_V3) { + if (($mode_code & $self->UUID_MAKE_V3) or ($mode_code & $self->UUID_MAKE_V5)) { if (not (ref($valist[0]) and $valist[0]->isa("OSSP::uuid"))) { - croak("UUID_MAKE_V3 requires namespace argument to be OSSP::uuid object"); + croak("UUID_MAKE_V3/UUID_MAKE_V5 requires namespace argument to be OSSP::uuid object"); } my $ns = $valist[0]->{-uuid}; my $name = $valist[1]; Index: ossp-pkg/uuid/perl/uuid.pod RCS File: /v/ossp/cvs/ossp-pkg/uuid/perl/Attic/uuid.pod,v rcsdiff -q -kk '-r1.5' '-r1.6' -u '/v/ossp/cvs/ossp-pkg/uuid/perl/Attic/uuid.pod,v' 2>/dev/null --- uuid.pod 2004/12/31 19:20:39 1.5 +++ uuid.pod 2005/01/23 12:38:10 1.6 @@ -41,8 +41,8 @@ (API) and corresponding command line interface (CLI) for the generation of DCE 1.1 and ISO/IEC 11578:1996 compliant I (UUID). It supports DCE 1.1 variant UUIDs of version 1 (time -and node based), version 3 (name based) and version 4 (random number -based). +and node based), version 3 (name based, MD5), version 4 (random number +based) and version 5 (name based, SHA-1). B provides two Perl APIs: @@ -77,9 +77,9 @@ =back -Additionally, the strings C<"v1">, C<"v2">, C<"v3"> and C<"mc"> can be -used in C<$mode> and the strings C<"bin">, C<"str">, and C<"txt"> can be -used for C<$fmt>. +Additionally, the strings C<"v1">, C<"v3">, C<"v4">, C<"v5"> and C<"mc"> +can be used in C<$mode> and the strings C<"bin">, C<"str">, and C<"txt"> +can be used for C<$fmt>. =head2 C-STYLE API @@ -128,6 +128,7 @@ C, C, C, +C, C, C, C, Index: ossp-pkg/uuid/perl/uuid.xs RCS File: /v/ossp/cvs/ossp-pkg/uuid/perl/Attic/uuid.xs,v rcsdiff -q -kk '-r1.3' '-r1.4' -u '/v/ossp/cvs/ossp-pkg/uuid/perl/Attic/uuid.xs,v' 2>/dev/null --- uuid.xs 2004/12/31 19:20:39 1.3 +++ uuid.xs 2005/01/23 12:38:10 1.4 @@ -57,6 +57,7 @@ { "UUID_MAKE_V1", UUID_MAKE_V1 }, { "UUID_MAKE_V3", UUID_MAKE_V3 }, { "UUID_MAKE_V4", UUID_MAKE_V4 }, + { "UUID_MAKE_V5", UUID_MAKE_V5 }, { "UUID_MAKE_MC", UUID_MAKE_MC }, { "UUID_FMT_BIN", UUID_FMT_BIN }, { "UUID_FMT_STR", UUID_FMT_STR }, @@ -126,11 +127,11 @@ uuid_t *ns; const char *name; CODE: - if (mode & UUID_MAKE_V3) { + if ((mode & UUID_MAKE_V3) || (mode & UUID_MAKE_V5)) { if (items != 4) - croak("mode UUID_MAKE_V3 requires two additional arguments to uuid_make()"); + croak("mode UUID_MAKE_V3/UUID_MAKE_V5 requires two additional arguments to uuid_make()"); if (!SvROK(ST(2))) - croak("mode UUID_MAKE_V3 requires a UUID object as namespace"); + croak("mode UUID_MAKE_V3/UUID_MAKE_V5 requires a UUID object as namespace"); ns = INT2PTR(uuid_t *, SvIV((SV*)SvRV(ST(2)))); name = (const char *)SvPV_nolen(ST(3)); RETVAL = uuid_make(uuid, mode, ns, name);