| 1 |
<html><head> |
|---|
| 2 |
<META http-equiv="content-type" content="text/html; charset=utf-8"> |
|---|
| 3 |
<title>tango.scrapple.util.uuid.NameUuidGen</title> |
|---|
| 4 |
</head><body> |
|---|
| 5 |
<h1>tango.scrapple.util.uuid.NameUuidGen</h1> |
|---|
| 6 |
<!-- Generated by Ddoc from NameUuidGen.d --> |
|---|
| 7 |
<b>License:</b><br> |
|---|
| 8 |
BSD style: |
|---|
| 9 |
|
|---|
| 10 |
<br><br> |
|---|
| 11 |
<b>Authors:</b><br> |
|---|
| 12 |
Max Samukha |
|---|
| 13 |
<br><br> |
|---|
| 14 |
|
|---|
| 15 |
With the functions in this module, UUIDs can be created from names |
|---|
| 16 |
that are unique within a name space. |
|---|
| 17 |
<br><br> |
|---|
| 18 |
|
|---|
| 19 |
MD-5 or SHA-1 hashing algorithms can be used to generate a name-based UUID. |
|---|
| 20 |
If backward compatibility is not an issue, SHA-1 should be preferred. |
|---|
| 21 |
<br><br> |
|---|
| 22 |
|
|---|
| 23 |
The functions are thread-safe. |
|---|
| 24 |
|
|---|
| 25 |
<br><br> |
|---|
| 26 |
<b>Examples:</b><br> |
|---|
| 27 |
<pre class="d_code"><font color=blue>auto</font> uuid = newUuidSha1(NameSpaceUuids.url, <font color=red>"http://www.dsource.org"</font>); |
|---|
| 28 |
</pre> |
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 |
<br><br> |
|---|
| 32 |
|
|---|
| 33 |
<dl><dt><big>Uuid <u>newUuidSha1</u>(Uuid <i>nsUuid</i>, char[] <i>name</i>); |
|---|
| 34 |
</big></dt> |
|---|
| 35 |
<dd>Generates a name-based UUID using SHA-1 hashing algorithm (version 5 UUID). |
|---|
| 36 |
<br><br> |
|---|
| 37 |
<b>Params:</b><br> |
|---|
| 38 |
<table><tr><td>Uuid <i>nsUuid</i></td> |
|---|
| 39 |
<td>namespace UUID.</td></tr> |
|---|
| 40 |
<tr><td>char[] <i>name</i></td> |
|---|
| 41 |
<td>name from which to generate.</td></tr> |
|---|
| 42 |
</table><br> |
|---|
| 43 |
<b>Returns:</b><br> |
|---|
| 44 |
The generated UUID. |
|---|
| 45 |
<br><br> |
|---|
| 46 |
|
|---|
| 47 |
</dd> |
|---|
| 48 |
<dt><big>Uuid <u>newUuidMd5</u>(Uuid <i>nsUuid</i>, char[] <i>name</i>); |
|---|
| 49 |
</big></dt> |
|---|
| 50 |
<dd>Generates a name-based UUID using MD-5 hashing algorithm (version 3 UUID). |
|---|
| 51 |
<br><br> |
|---|
| 52 |
<b>Params:</b><br> |
|---|
| 53 |
<table><tr><td>Uuid <i>nsUuid</i></td> |
|---|
| 54 |
<td>namespace UUID.</td></tr> |
|---|
| 55 |
<tr><td>char[] <i>name</i></td> |
|---|
| 56 |
<td><i>name</i> from which to generate.</td></tr> |
|---|
| 57 |
</table><br> |
|---|
| 58 |
<b>Returns:</b><br> |
|---|
| 59 |
The generated UUID. |
|---|
| 60 |
<br><br> |
|---|
| 61 |
|
|---|
| 62 |
</dd> |
|---|
| 63 |
<dt><big>struct <u>NameSpaceUuids</u>; |
|---|
| 64 |
</big></dt> |
|---|
| 65 |
<dd>A subset of commonly used namespace UUIDs |
|---|
| 66 |
<br><br> |
|---|
| 67 |
|
|---|
| 68 |
<dl><dt><big>static const Uuid <u>dns</u>; |
|---|
| 69 |
</big></dt> |
|---|
| 70 |
<dd><br><br> |
|---|
| 71 |
</dd> |
|---|
| 72 |
<dt><big>static const Uuid <u>url</u>; |
|---|
| 73 |
</big></dt> |
|---|
| 74 |
<dd><br><br> |
|---|
| 75 |
</dd> |
|---|
| 76 |
<dt><big>static const Uuid <u>oid</u>; |
|---|
| 77 |
</big></dt> |
|---|
| 78 |
<dd><br><br> |
|---|
| 79 |
</dd> |
|---|
| 80 |
<dt><big>static const Uuid <u>x500</u>; |
|---|
| 81 |
</big></dt> |
|---|
| 82 |
<dd><br><br> |
|---|
| 83 |
</dd> |
|---|
| 84 |
</dl> |
|---|
| 85 |
</dd> |
|---|
| 86 |
</dl> |
|---|
| 87 |
|
|---|
| 88 |
<hr><small>Page generated by <a href="http://www.digitalmars.com/d/1.0/ddoc.html">Ddoc</a>. Copyright (c) 2007 Max Samukha. All rights reserved |
|---|
| 89 |
|
|---|
| 90 |
</small> |
|---|
| 91 |
</body></html> |
|---|