120 lines
2.6 KiB
HTML
120 lines
2.6 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of SD_ID128_RANDOMIZE</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>SD_ID128_RANDOMIZE</H1>
|
|
Section: sd_id128_randomize (3)<BR>Updated: <BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
sd_id128_randomize - Generate 128-bit IDs
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<P>
|
|
<B>
|
|
</B><PRE>
|
|
#include <<A HREF="file:///usr/include/systemd/sd-id128.h">systemd/sd-id128.h</A>>
|
|
</PRE>
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="1">
|
|
<B>int sd_id128_randomize(sd_id128_t *</B><I>ret</I><B>);</B>
|
|
|
|
</DL>
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<P>
|
|
|
|
<B>sd_id128_randomize()</B>
|
|
<DD>generates a new randomized 128-bit ID and returns it in
|
|
<I>ret</I>. Every invocation returns a new randomly generated ID. This uses the
|
|
/dev/urandom
|
|
kernel random number generator.
|
|
<P>
|
|
|
|
Note that
|
|
<B>sd_id128_randomize()</B>
|
|
always returns a UUID v4-compatible ID.
|
|
<P>
|
|
|
|
For more information about the
|
|
"sd_id128_t"
|
|
type, see
|
|
<B><A HREF="/cgi-bin/man/man2html?3+sd-id128">sd-id128</A></B>(3).
|
|
<P>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+systemd-id128">systemd-id128</A></B>(1)'s
|
|
<B>new</B>
|
|
command may be used as a command line front-end for
|
|
<B>sd_id128_randomize()</B>.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>RETURN VALUE</H2>
|
|
|
|
<P>
|
|
|
|
The call returns 0 on success (in which case
|
|
<I>ret</I>
|
|
is filled in), or a negative errno-style error code.
|
|
<A NAME="lbAF"> </A>
|
|
<H2>NOTES</H2>
|
|
|
|
<P>
|
|
|
|
These APIs are implemented as a shared library, which can be compiled and linked to with the
|
|
<B>libsystemd</B> <B><A HREF="/cgi-bin/man/man2html?1+pkg-config">pkg-config</A></B>(1)
|
|
file.
|
|
<A NAME="lbAG"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<P>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+systemd">systemd</A></B>(1),
|
|
<B><A HREF="/cgi-bin/man/man2html?3+sd-id128">sd-id128</A></B>(3),
|
|
<B><A HREF="/cgi-bin/man/man2html?5+machine-id">machine-id</A></B>(5),
|
|
<B><A HREF="/cgi-bin/man/man2html?4+random">random</A></B>(4),
|
|
<B><A HREF="/cgi-bin/man/man2html?3+sd_id128_get_machine">sd_id128_get_machine</A></B>(3)
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="2"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="3"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="4"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="5"><A HREF="#lbAE">RETURN VALUE</A><DD>
|
|
<DT id="6"><A HREF="#lbAF">NOTES</A><DD>
|
|
<DT id="7"><A HREF="#lbAG">SEE ALSO</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:55 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|