1SD_ID128_RANDOMIZE(3) sd_id128_randomize SD_ID128_RANDOMIZE(3)
2
3
4
6 sd_id128_randomize - Generate 128-bit IDs
7
9 #include <systemd/sd-id128.h>
10
11 int sd_id128_randomize(sd_id128_t *ret);
12
14 sd_id128_randomize() generates a new randomized 128-bit ID and returns
15 it in ret. Every invocation returns a new randomly generated ID. This
16 uses the /dev/urandom kernel random number generator.
17
18 Note that sd_id128_randomize() always returns a UUID v4-compatible ID.
19
20 For more information about the "sd_id128_t" type, see sd-id128(3).
21
22 systemd-id128(1)'s new command may be used as a command line front-end
23 for sd_id128_randomize().
24
26 The call returns 0 on success (in which case ret is filled in), or a
27 negative errno-style error code.
28
30 These APIs are implemented as a shared library, which can be compiled
31 and linked to with the libsystemd pkg-config(1) file.
32
34 systemd(1), sd-id128(3), machine-id(5), random(4),
35 sd_id128_get_machine(3)
36
37
38
39systemd 248 SD_ID128_RANDOMIZE(3)