[原文]
.TH "UUID_GENERATE" "3" "2021-06-02" "util-linux 2.37.2" 
"Programmer\(aqs Manual"
.ie \n(.g .ds Aq \(aq .el       .ds Aq ' .ss \n[.ss] 0 .nh 
.ad l .de URL \\$2 <\\$1>\\$3 .. .als MTO URL .if \n[.g] 
\{\ .  mso www.tmac .  am URL .    ad l .  . .  am MTO .    
ad l .  . .  LINKSTYLE blue R < > .\} 
[訳文]
.TH UUID_GENERATE 3 2021-06-02 "util-linux 2.37.2" 
プログラマーマニュアル
.ie  \n(.g .ds Aq \(aq .el       .ds Aq ' .ss \n[.ss] 0 .nh 
.ad l .de  URL \\$2 <\\$1>\\$3 .. .als MTO URL .if  \n[.g] 
\{\ .  mso www.tmac .  am URL .    ad l .  . .  am MTO .    
ad l .  . .  LINKSTYLE blue R < > .\} 
----------------------------------------
[原文]
.SH "NAME"
uuid_generate, uuid_generate_random, uuid_generate_time, 
uuid_generate_time_safe - create a new unique UUID value 
[訳文]
.SH 名前
uuid_generate, uuid_generate_random, uuid_generate_time, 
uuid_generate_time_safe - 新規に一意の UUID を生成する 
----------------------------------------
[原文]
.SH "SYNOPSIS"
[訳文]
.SH 書式
----------------------------------------
[原文]
.sp
#include <uuid.h> 
[訳文]
.sp
#include <uuid.h> 
----------------------------------------
[原文]
.sp
void uuid_generate(uuid_t out); 
void uuid_generate_random(uuid_t out); 
void uuid_generate_time(uuid_t out); 
int uuid_generate_time_safe(uuid_t out); 
void uuid_generate_md5(uuid_t out, const uuid_t \fIns, 
const char *name, size_t len);\fP 
void uuid_generate_sha1(uuid_t out, const uuid_t \fIns, 
const char *name, size_t len);\fP 
[訳文]
.sp
void uuid_generate(uuid_t out); 
void uuid_generate_random(uuid_t out); 
void uuid_generate_time(uuid_t out); 
int uuid_generate_time_safe(uuid_t out); 
void uuid_generate_md5(uuid_t out, const uuid_t ns, const 
char *name, size_t len); 
void uuid_generate_sha1(uuid_t out, const uuid_t ns, const 
char *name, size_t len); 
----------------------------------------
[原文]
.SH "DESCRIPTION"
[訳文]
.SH 説明
----------------------------------------
[原文]
.sp
The uuid_generate() function creates a new universally 
unique identifier (UUID). The uuid will be generated based 
on high-quality randomness from getrandom(2), /dev/urandom, 
or /dev/random if available. If it is not available, then 
uuid_generate() will use an alternative algorithm which 
uses the current time, the local ethernet MAC address (if 
available), and random data generated using a pseudo-random 
generator. 
[訳文]
.sp
uuid_generate() 関数は、 新たな UUID (universally unique 
identifier) を生成する。 UUID の生成にあたっては、 
getrandom(2)、 /dev/urandom、 /dev/random 
の中の利用可能なものが用いられ、 高品質な乱数が生成される。 
これが利用できない場合、 uuid_generate() は、 
これに代わるアルゴリズムを採用する。 そこでは、 現在時刻、 
ローカルイーサネットの MAC アドレス (利用できる場合)、 
疑似乱数ジェネレーターを使って生成される乱数データを利用する
。 
----------------------------------------
[原文]
.sp
The uuid_generate_random() function forces the use of the 
all-random UUID format, even if a high-quality random 
number generator is not available, in which case a 
pseudo-random generator will be substituted. Note that the 
use of a pseudo-random generator may compromise the 
uniqueness of UUIDs generated in this fashion. 
[訳文]
.sp
uuid_generate_random() 関数は、 
高品質の乱数ジェネレーターが利用できない場合であっても、完全
なランダム UUID フォーマットを強制的に利用する。 
この場合は、 疑似乱数ジェネレーターが代わりに用いられる。 
ただし疑似乱数ジェネレーターを用いると、 生成される UUID 
の一意性は損なわれる場合があることに注意すること。 
----------------------------------------
[原文]
.sp
The uuid_generate_time() function forces the use of the 
alternative algorithm which uses the current time and the 
local ethernet MAC address (if available). This algorithm 
used to be the default one used to generate UUIDs, but 
because of the use of the ethernet MAC address, it can leak 
information about when and where the UUID was generated. 
This can cause privacy problems in some applications, so 
the uuid_generate() function only uses this algorithm if a 
high-quality source of randomness is not available. To 
guarantee uniqueness of UUIDs generated by concurrently 
running processes, the uuid library uses a global clock 
state counter (if the process has permissions to gain 
exclusive access to this file) and/or the uuidd daemon, if 
it is running already or can be spawned by the process (if 
installed and the process has enough permissions to run 
it). If neither of these two synchronization mechanisms can 
be used, it is theoretically possible that two concurrently 
running processes obtain the same UUID(s). To tell whether 
the UUID has been generated in a safe manner, use 
uuid_generate_time_safe. 
[訳文]
.sp
uuid_generate_time() 関数は、 現在時刻と (利用可能であれば) 
ローカルのイーサネット MAC アドレスを用いた、 
別のアルゴリズムを強制的に利用する。 このアルゴリズムは、 
かつては UUID を生成するデフォルトであった。 
ただしイーサネット MAC アドレスを利用することから、 
いつどこで UUID 
が生成されたものであるかの情報が漏れてしまう。 
アプリケーションによっては、 
プライバシーの問題を引き起こす場合がある。 そこで 
uuid_generate() 関数は、 
高品質の乱数発生の仕組みが利用できない場合に限って、 
このアルゴリズムを利用している。 
並列実行されているプロセスから生成される UUID であっても、 
その一意性を保証するために、 uuid ライブラリでは、 
グローバルクロックの状態カウンター (status counter) 
を利用する (プロセスが、 
このファイルへの排他的アクセス権限を取得できる場合)。 
または uuidd デーモンを利用する 
(これがインストールされていて、 
プロセスがその実行権限を持っている場合)。 この 2 
つの同期のメカニズムがともに利用できない場合、 2 
つの同時実行されたプロセスが、 同一の UUID 
を取得することは、 理論的には可能になる。 UUID 
が安全な方法で生成されたことを確認するには、 
uuid_generate_time_safe を用いること。 
----------------------------------------
[原文]
.sp
The uuid_generate_time_safe() function is similar to 
uuid_generate_time(), except that it returns a value which 
denotes whether any of the synchronization mechanisms (see 
above) has been used. 
[訳文]
.sp
uuid_generate_time_safe() 関数は uuid_generate_time() 
と同様である。 ただし関数の返り値として、 
どの同期メカニズム (前述参照) を用いたのかを表す値を返す。 
----------------------------------------
[原文]
.sp
The UUID is 16 bytes (128 bits) long, which gives 
approximately 3.4x10^38 unique values (there are 
approximately 10^80 elementary particles in the universe 
according to Carl Sagan\(cqs Cosmos). The new UUID can 
reasonably be considered unique among all UUIDs created on 
the local system, and among UUIDs created on other systems 
in the past and in the future. 
[訳文]
.sp
UUID は 16 バイト長 (128 ビット) であり、 およそ 3.4x10^38 
個の一意な値を提供する (Carl Sagan の Cosmos 
によると、宇宙には 10^38 個の素粒子があるとのこと)。 
新たに生成された UUID は、 
ローカルシステム内に生成されている UUID 
に対して一意であり、 また過去から未来に向けて、 
他のシステム上において生成される UUID 
に対しても一意となる、 と考えてかまわない。 
----------------------------------------
[原文]
.sp
The uuid_generate_md5() and uuid_generate_sha1() functions 
generate an MD5 and SHA1 hashed (predictable) UUID based on 
a well-known UUID providing the namespace and an arbitrary 
binary string. The UUIDs conform to V3 and V5 UUIDs per \c 
.URL "https://tools.ietf.org/html/rfc4122" "RFC-4122" "." 
[訳文]
.sp
uuid_generate_md5() 関数および uuid_generate_sha1() 
関数は、 名前空間および任意のバイナリ文字列を提供する既知の 
UUID に基づいた、 MD5 ハッシュ、 SHA1 ハッシュの 
(予測可能な) UUID を提供する。 UUID は、 以下の V3 および 
V5 に準拠している。 .URL 
https://tools.ietf.org/html/rfc4122 RFC-4122 . 
----------------------------------------
[原文]
.SH "RETURN VALUE"
[訳文]
.SH 返り値
----------------------------------------
[原文]
.sp
The newly created UUID is returned in the memory location 
pointed to by out. uuid_generate_time_safe() returns zero 
if the UUID has been generated in a safe manner, -1 
otherwise. 
[訳文]
.sp
新たに生成された UUID は、 out 
によって示されるメモリ上の場所に返される。 UUID 
が安全な方法で生成されたら 0 を返す。 そうでない場合は -1 
を返す。 
----------------------------------------
[原文]
.SH "CONFORMING TO"
[訳文]
.SH 準拠
----------------------------------------
[原文]
.sp
This library generates UUIDs compatible with OSF DCE 1.1, 
and hash based UUIDs V3 and V5 compatible with \c .URL 
"https://tools.ietf.org/html/rfc4122" "RFC-4122" "." 
[訳文]
.sp
本ライブラリは OSF DCE 1.1 と互換の UUID を生成する。 
またハッシュベース UUID V3 と V5 は、 以下と互換である: 
.URL https://tools.ietf.org/html/rfc4122 RFC-4122 . 
----------------------------------------
[原文]
.SH "AUTHORS"
[訳文]
.SH 著者
----------------------------------------
[原文]
.sp
Theodore Y. Ts\(cqo 
[訳文]
.sp
Theodore Y. Ts\(cqo 
----------------------------------------
[原文]
.SH "SEE ALSO"
[訳文]
.SH 関連項目
----------------------------------------
[原文]
.sp
uuidgen(1), uuid(3), uuid_clear(3), uuid_compare(3), 
uuid_copy(3), uuid_is_null(3), uuid_parse(3), uuid_time(3), 
uuid_unparse(3), uuidd(8) 
[訳文]
.sp
uuidgen(1), uuid(3), uuid_clear(3), uuid_compare(3), 
uuid_copy(3), uuid_is_null(3), uuid_parse(3), uuid_time(3), 
uuid_unparse(3), uuidd(8) 
----------------------------------------
[原文]
.SH "REPORTING BUGS"
[訳文]
.SH バグ報告
----------------------------------------
[原文]
.sp
For bug reports, use the issue tracker at \c .URL 
"https://github.com/karelzak/util-linux/issues" "" "." 
[訳文]
.sp
バグ報告は、 以下にある issue トラッカーを利用すること。 
.URL https://github.com/karelzak/util-linux/issues "" . 
----------------------------------------
[原文]
.SH "AVAILABILITY"
[訳文]
.SH 入手方法
----------------------------------------
[原文]
.sp
The libuuid library is part of the util-linux package since 
version 2.15.1. It can be downloaded from \c .URL 
"https://www.kernel.org/pub/linux/utils/util-linux/" "Linux 
Kernel Archive" "." 
[訳文]
.sp
libuuid ライブラリは、 util-linux 2.15.1 以降、 
このパッケージの一部であり、 以下からダウンロードできる。 
.URL https://www.kernel.org/pub/linux/utils/util-linux/ 
"Linux Kernel Archive" . 
----------------------------------------