*-s*, *--sha1*::
Use SHA1 as the hash algorithm.
+*-6*, *--time-v6*::
+Generate a time-based UUID. This method creates a UUID based on the system clock plus and is lexicographically sortable according to the contained timestamp.
+
+*-7*, *--time-v7*::
+Generate a time-based UUID. This method creates a UUID based on the system clock plus and is lexicographically sortable according to the contained timestamp.
+
*-n*, *--namespace* _namespace_::
Generate the hash with the _namespace_ prefix. The _namespace_ is UUID, or '@ns' where "ns" is well-known predefined UUID addressed by namespace name (see above).
*uuidparse*(1),
*libuuid*(3),
link:https://tools.ietf.org/html/rfc4122[RFC 4122]
+link:https://tools.ietf.org/html/rfcXXXX[RFC XXXX]
include::man-common/bugreports.adoc[]
fputs(_(" -m, --md5 generate md5 hash\n"), out);
fputs(_(" -C, --count <num> generate more uuids in loop\n"), out);
fputs(_(" -s, --sha1 generate sha1 hash\n"), out);
+ fputs(_(" -6, --time-v6 generate time-based v6 uuid\n"), out);
+ fputs(_(" -7, --time-v7 generate time-based v7 uuid\n"), out);
fputs(_(" -x, --hex interpret name as hex string\n"), out);
fputs(USAGE_SEPARATOR, out);
fprintf(out, USAGE_HELP_OPTIONS(21));
{"md5", no_argument, NULL, 'm'},
{"count", required_argument, NULL, 'C'},
{"sha1", no_argument, NULL, 's'},
+ {"time-v6", no_argument, NULL, '6'},
+ {"time-v7", no_argument, NULL, '7'},
{"hex", no_argument, NULL, 'x'},
{NULL, 0, NULL, 0}
};
static const ul_excl_t excl[] = {
+ { '6', '7', 'm', 'r', 's', 't' },
{ 'C', 'm', 's' },
{ 'N', 'r', 't' },
- { 'm', 'r', 's', 't' },
{ 'n', 'r', 't' },
{ 0 }
};
textdomain(PACKAGE);
close_stdout_atexit();
- while ((c = getopt_long(argc, argv, "C:rtVhn:N:msx", longopts, NULL)) != -1) {
+ while ((c = getopt_long(argc, argv, "C:rtVhn:N:msx67", longopts, NULL)) != -1) {
err_exclusive_options(c, longopts, excl, excl_st);
case 'x':
is_hex = 1;
break;
+ case '6':
+ do_type = UUID_TYPE_DCE_TIME_V6;
+ break;
+ case '7':
+ do_type = UUID_TYPE_DCE_TIME_V7;
+ break;
case 'h':
usage();
case UUID_TYPE_DCE_TIME:
uuid_generate_time(uu);
break;
+ case UUID_TYPE_DCE_TIME_V6:
+ uuid_generate_time_v6(uu);
+ break;
+ case UUID_TYPE_DCE_TIME_V7:
+ uuid_generate_time_v7(uu);
+ break;
case UUID_TYPE_DCE_RANDOM:
uuid_generate_random(uu);
break;