]> gitweb.factorcode.org Git - factor.git/blob - basis/uuid/uuid-docs.factor
f2f54b6ecd43a19d64f9dd225849d4375514a8d5
[factor.git] / basis / uuid / uuid-docs.factor
1
2 USING: help.syntax help.markup kernel prettyprint sequences strings ;
3
4 IN: uuid
5
6 HELP: uuid1
7 { $values { "string" "a UUID string" } }
8 { $description
9     "Generates a UUID (version 1) from the host ID, sequence number, "
10     "and current time."
11 } ;
12
13 HELP: uuid3
14 { $values { "namespace" string } { "name" string } { "string" "a UUID string" } }
15 { $description
16     "Generates a UUID (version 3) from the MD5 hash of a namespace "
17     "UUID and a name."
18 } ;
19
20 HELP: uuid4
21 { $values { "string" "a UUID string" } }
22 { $description
23     "Generates a UUID (version 4) from random bits."
24 } ;
25
26 HELP: uuid5
27 { $values { "namespace" string } { "name" string } { "string" "a UUID string" } }
28 { $description
29     "Generates a UUID (version 5) from the SHA-1 hash of a namespace "
30     "UUID and a name."
31 } ;
32
33
34 ARTICLE: "uuid" "UUID (Universally Unique Identifier)"
35 "The " { $vocab-link "uuid" } " vocabulary is used to generate UUIDs. "
36 "The below words can be used to generate version 1, 3, 4, and 5 UUIDs as specified in RFC 4122."
37 $nl
38 "If all you want is a unique ID, you should probably call " { $link uuid1 } " or " { $link uuid4 } "."
39 { $subsections
40     uuid1
41     uuid3
42     uuid4
43     uuid5
44 }
45 ;
46
47 ABOUT: "uuid"